mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-037237f8314ad3a0/out/
asluav.rs

1#![doc = "MAVLink ASLUAV dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::{bitflags, Flags};
9use mavlink_core::{
10    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
11};
12#[allow(unused_imports)]
13use num_derive::FromPrimitive;
14#[allow(unused_imports)]
15use num_derive::ToPrimitive;
16#[allow(unused_imports)]
17use num_traits::FromPrimitive;
18#[allow(unused_imports)]
19use num_traits::ToPrimitive;
20#[cfg(feature = "serde")]
21use serde::{Deserialize, Serialize};
22#[cfg(feature = "ts")]
23use ts_rs::TS;
24pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
25#[cfg_attr(feature = "ts", derive(TS))]
26#[cfg_attr(feature = "ts", ts(export))]
27#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
28#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29#[cfg_attr(feature = "serde", serde(tag = "type"))]
30#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31#[repr(u32)]
32#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
33pub enum ActuatorConfiguration {
34    #[doc = "Do nothing."]
35    ACTUATOR_CONFIGURATION_NONE = 0,
36    #[doc = "Command the actuator to beep now."]
37    ACTUATOR_CONFIGURATION_BEEP = 1,
38    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
39    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
40    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
41    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
42    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
43    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
44    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
45    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
46}
47impl ActuatorConfiguration {
48    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
49}
50impl Default for ActuatorConfiguration {
51    fn default() -> Self {
52        Self::DEFAULT
53    }
54}
55#[cfg_attr(feature = "ts", derive(TS))]
56#[cfg_attr(feature = "ts", ts(export))]
57#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
58#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
59#[cfg_attr(feature = "serde", serde(tag = "type"))]
60#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
61#[repr(u32)]
62#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
63pub enum ActuatorOutputFunction {
64    #[doc = "No function (disabled)."]
65    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
66    #[doc = "Motor 1"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
68    #[doc = "Motor 2"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
70    #[doc = "Motor 3"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
72    #[doc = "Motor 4"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
74    #[doc = "Motor 5"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
76    #[doc = "Motor 6"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
78    #[doc = "Motor 7"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
80    #[doc = "Motor 8"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
82    #[doc = "Motor 9"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
84    #[doc = "Motor 10"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
86    #[doc = "Motor 11"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
88    #[doc = "Motor 12"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
90    #[doc = "Motor 13"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
92    #[doc = "Motor 14"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
94    #[doc = "Motor 15"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
96    #[doc = "Motor 16"]
97    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
98    #[doc = "Servo 1"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
100    #[doc = "Servo 2"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
102    #[doc = "Servo 3"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
104    #[doc = "Servo 4"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
106    #[doc = "Servo 5"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
108    #[doc = "Servo 6"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
110    #[doc = "Servo 7"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
112    #[doc = "Servo 8"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
114    #[doc = "Servo 9"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
116    #[doc = "Servo 10"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
118    #[doc = "Servo 11"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
120    #[doc = "Servo 12"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
122    #[doc = "Servo 13"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
124    #[doc = "Servo 14"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
126    #[doc = "Servo 15"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
128    #[doc = "Servo 16"]
129    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
130}
131impl ActuatorOutputFunction {
132    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
133}
134impl Default for ActuatorOutputFunction {
135    fn default() -> Self {
136        Self::DEFAULT
137    }
138}
139#[cfg_attr(feature = "ts", derive(TS))]
140#[cfg_attr(feature = "ts", ts(export))]
141#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
143#[cfg_attr(feature = "serde", serde(tag = "type"))]
144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
145#[repr(u32)]
146#[doc = "Enumeration of the ADSB altimeter types"]
147pub enum AdsbAltitudeType {
148    #[doc = "Altitude reported from a Baro source using QNH reference"]
149    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
150    #[doc = "Altitude reported from a GNSS source"]
151    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
152}
153impl AdsbAltitudeType {
154    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
155}
156impl Default for AdsbAltitudeType {
157    fn default() -> Self {
158        Self::DEFAULT
159    }
160}
161#[cfg_attr(feature = "ts", derive(TS))]
162#[cfg_attr(feature = "ts", ts(export))]
163#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
165#[cfg_attr(feature = "serde", serde(tag = "type"))]
166#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
167#[repr(u32)]
168#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
169pub enum AdsbEmitterType {
170    ADSB_EMITTER_TYPE_NO_INFO = 0,
171    ADSB_EMITTER_TYPE_LIGHT = 1,
172    ADSB_EMITTER_TYPE_SMALL = 2,
173    ADSB_EMITTER_TYPE_LARGE = 3,
174    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
175    ADSB_EMITTER_TYPE_HEAVY = 5,
176    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
177    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
178    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
179    ADSB_EMITTER_TYPE_GLIDER = 9,
180    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
181    ADSB_EMITTER_TYPE_PARACHUTE = 11,
182    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
183    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
184    ADSB_EMITTER_TYPE_UAV = 14,
185    ADSB_EMITTER_TYPE_SPACE = 15,
186    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
187    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
188    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
189    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
190}
191impl AdsbEmitterType {
192    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
193}
194impl Default for AdsbEmitterType {
195    fn default() -> Self {
196        Self::DEFAULT
197    }
198}
199bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
200impl AdsbFlags {
201    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
202}
203impl Default for AdsbFlags {
204    fn default() -> Self {
205        Self::DEFAULT
206    }
207}
208bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
209impl AisFlags {
210    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
211}
212impl Default for AisFlags {
213    fn default() -> Self {
214        Self::DEFAULT
215    }
216}
217#[cfg_attr(feature = "ts", derive(TS))]
218#[cfg_attr(feature = "ts", ts(export))]
219#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
221#[cfg_attr(feature = "serde", serde(tag = "type"))]
222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
223#[repr(u32)]
224#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
225pub enum AisNavStatus {
226    #[doc = "Under way using engine."]
227    UNDER_WAY = 0,
228    AIS_NAV_ANCHORED = 1,
229    AIS_NAV_UN_COMMANDED = 2,
230    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
231    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
232    AIS_NAV_MOORED = 5,
233    AIS_NAV_AGROUND = 6,
234    AIS_NAV_FISHING = 7,
235    AIS_NAV_SAILING = 8,
236    AIS_NAV_RESERVED_HSC = 9,
237    AIS_NAV_RESERVED_WIG = 10,
238    AIS_NAV_RESERVED_1 = 11,
239    AIS_NAV_RESERVED_2 = 12,
240    AIS_NAV_RESERVED_3 = 13,
241    #[doc = "Search And Rescue Transponder."]
242    AIS_NAV_AIS_SART = 14,
243    #[doc = "Not available (default)."]
244    AIS_NAV_UNKNOWN = 15,
245}
246impl AisNavStatus {
247    pub const DEFAULT: Self = Self::UNDER_WAY;
248}
249impl Default for AisNavStatus {
250    fn default() -> Self {
251        Self::DEFAULT
252    }
253}
254#[cfg_attr(feature = "ts", derive(TS))]
255#[cfg_attr(feature = "ts", ts(export))]
256#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
258#[cfg_attr(feature = "serde", serde(tag = "type"))]
259#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
260#[repr(u32)]
261#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
262pub enum AisType {
263    #[doc = "Not available (default)."]
264    AIS_TYPE_UNKNOWN = 0,
265    AIS_TYPE_RESERVED_1 = 1,
266    AIS_TYPE_RESERVED_2 = 2,
267    AIS_TYPE_RESERVED_3 = 3,
268    AIS_TYPE_RESERVED_4 = 4,
269    AIS_TYPE_RESERVED_5 = 5,
270    AIS_TYPE_RESERVED_6 = 6,
271    AIS_TYPE_RESERVED_7 = 7,
272    AIS_TYPE_RESERVED_8 = 8,
273    AIS_TYPE_RESERVED_9 = 9,
274    AIS_TYPE_RESERVED_10 = 10,
275    AIS_TYPE_RESERVED_11 = 11,
276    AIS_TYPE_RESERVED_12 = 12,
277    AIS_TYPE_RESERVED_13 = 13,
278    AIS_TYPE_RESERVED_14 = 14,
279    AIS_TYPE_RESERVED_15 = 15,
280    AIS_TYPE_RESERVED_16 = 16,
281    AIS_TYPE_RESERVED_17 = 17,
282    AIS_TYPE_RESERVED_18 = 18,
283    AIS_TYPE_RESERVED_19 = 19,
284    #[doc = "Wing In Ground effect."]
285    AIS_TYPE_WIG = 20,
286    AIS_TYPE_WIG_HAZARDOUS_A = 21,
287    AIS_TYPE_WIG_HAZARDOUS_B = 22,
288    AIS_TYPE_WIG_HAZARDOUS_C = 23,
289    AIS_TYPE_WIG_HAZARDOUS_D = 24,
290    AIS_TYPE_WIG_RESERVED_1 = 25,
291    AIS_TYPE_WIG_RESERVED_2 = 26,
292    AIS_TYPE_WIG_RESERVED_3 = 27,
293    AIS_TYPE_WIG_RESERVED_4 = 28,
294    AIS_TYPE_WIG_RESERVED_5 = 29,
295    AIS_TYPE_FISHING = 30,
296    AIS_TYPE_TOWING = 31,
297    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
298    AIS_TYPE_TOWING_LARGE = 32,
299    #[doc = "Dredging or other underwater ops."]
300    AIS_TYPE_DREDGING = 33,
301    AIS_TYPE_DIVING = 34,
302    AIS_TYPE_MILITARY = 35,
303    AIS_TYPE_SAILING = 36,
304    AIS_TYPE_PLEASURE = 37,
305    AIS_TYPE_RESERVED_20 = 38,
306    AIS_TYPE_RESERVED_21 = 39,
307    #[doc = "High Speed Craft."]
308    AIS_TYPE_HSC = 40,
309    AIS_TYPE_HSC_HAZARDOUS_A = 41,
310    AIS_TYPE_HSC_HAZARDOUS_B = 42,
311    AIS_TYPE_HSC_HAZARDOUS_C = 43,
312    AIS_TYPE_HSC_HAZARDOUS_D = 44,
313    AIS_TYPE_HSC_RESERVED_1 = 45,
314    AIS_TYPE_HSC_RESERVED_2 = 46,
315    AIS_TYPE_HSC_RESERVED_3 = 47,
316    AIS_TYPE_HSC_RESERVED_4 = 48,
317    AIS_TYPE_HSC_UNKNOWN = 49,
318    AIS_TYPE_PILOT = 50,
319    #[doc = "Search And Rescue vessel."]
320    AIS_TYPE_SAR = 51,
321    AIS_TYPE_TUG = 52,
322    AIS_TYPE_PORT_TENDER = 53,
323    #[doc = "Anti-pollution equipment."]
324    AIS_TYPE_ANTI_POLLUTION = 54,
325    AIS_TYPE_LAW_ENFORCEMENT = 55,
326    AIS_TYPE_SPARE_LOCAL_1 = 56,
327    AIS_TYPE_SPARE_LOCAL_2 = 57,
328    AIS_TYPE_MEDICAL_TRANSPORT = 58,
329    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
330    AIS_TYPE_NONECOMBATANT = 59,
331    AIS_TYPE_PASSENGER = 60,
332    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
333    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
334    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
335    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
336    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
337    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
338    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
339    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
340    AIS_TYPE_PASSENGER_UNKNOWN = 69,
341    AIS_TYPE_CARGO = 70,
342    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
343    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
344    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
345    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
346    AIS_TYPE_CARGO_RESERVED_1 = 75,
347    AIS_TYPE_CARGO_RESERVED_2 = 76,
348    AIS_TYPE_CARGO_RESERVED_3 = 77,
349    AIS_TYPE_CARGO_RESERVED_4 = 78,
350    AIS_TYPE_CARGO_UNKNOWN = 79,
351    AIS_TYPE_TANKER = 80,
352    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
353    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
354    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
355    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
356    AIS_TYPE_TANKER_RESERVED_1 = 85,
357    AIS_TYPE_TANKER_RESERVED_2 = 86,
358    AIS_TYPE_TANKER_RESERVED_3 = 87,
359    AIS_TYPE_TANKER_RESERVED_4 = 88,
360    AIS_TYPE_TANKER_UNKNOWN = 89,
361    AIS_TYPE_OTHER = 90,
362    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
363    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
364    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
365    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
366    AIS_TYPE_OTHER_RESERVED_1 = 95,
367    AIS_TYPE_OTHER_RESERVED_2 = 96,
368    AIS_TYPE_OTHER_RESERVED_3 = 97,
369    AIS_TYPE_OTHER_RESERVED_4 = 98,
370    AIS_TYPE_OTHER_UNKNOWN = 99,
371}
372impl AisType {
373    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
374}
375impl Default for AisType {
376    fn default() -> Self {
377        Self::DEFAULT
378    }
379}
380bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
381impl AttitudeTargetTypemask {
382    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
383}
384impl Default for AttitudeTargetTypemask {
385    fn default() -> Self {
386        Self::DEFAULT
387    }
388}
389#[cfg_attr(feature = "ts", derive(TS))]
390#[cfg_attr(feature = "ts", ts(export))]
391#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
393#[cfg_attr(feature = "serde", serde(tag = "type"))]
394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
395#[repr(u32)]
396#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
397pub enum AutotuneAxis {
398    #[doc = "Autotune roll axis."]
399    AUTOTUNE_AXIS_ROLL = 1,
400    #[doc = "Autotune pitch axis."]
401    AUTOTUNE_AXIS_PITCH = 2,
402    #[doc = "Autotune yaw axis."]
403    AUTOTUNE_AXIS_YAW = 4,
404}
405impl AutotuneAxis {
406    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
407}
408impl Default for AutotuneAxis {
409    fn default() -> Self {
410        Self::DEFAULT
411    }
412}
413bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
414impl CameraCapFlags {
415    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
416}
417impl Default for CameraCapFlags {
418    fn default() -> Self {
419        Self::DEFAULT
420    }
421}
422#[cfg_attr(feature = "ts", derive(TS))]
423#[cfg_attr(feature = "ts", ts(export))]
424#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
425#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
426#[cfg_attr(feature = "serde", serde(tag = "type"))]
427#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
428#[repr(u32)]
429#[doc = "Camera Modes."]
430pub enum CameraMode {
431    #[doc = "Camera is in image/photo capture mode."]
432    CAMERA_MODE_IMAGE = 0,
433    #[doc = "Camera is in video capture mode."]
434    CAMERA_MODE_VIDEO = 1,
435    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
436    CAMERA_MODE_IMAGE_SURVEY = 2,
437}
438impl CameraMode {
439    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
440}
441impl Default for CameraMode {
442    fn default() -> Self {
443        Self::DEFAULT
444    }
445}
446#[cfg_attr(feature = "ts", derive(TS))]
447#[cfg_attr(feature = "ts", ts(export))]
448#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
450#[cfg_attr(feature = "serde", serde(tag = "type"))]
451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
452#[repr(u32)]
453#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
454pub enum CameraSource {
455    #[doc = "Default camera source."]
456    CAMERA_SOURCE_DEFAULT = 0,
457    #[doc = "RGB camera source."]
458    CAMERA_SOURCE_RGB = 1,
459    #[doc = "IR camera source."]
460    CAMERA_SOURCE_IR = 2,
461    #[doc = "NDVI camera source."]
462    CAMERA_SOURCE_NDVI = 3,
463}
464impl CameraSource {
465    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
466}
467impl Default for CameraSource {
468    fn default() -> Self {
469        Self::DEFAULT
470    }
471}
472#[cfg_attr(feature = "ts", derive(TS))]
473#[cfg_attr(feature = "ts", ts(export))]
474#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
476#[cfg_attr(feature = "serde", serde(tag = "type"))]
477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
478#[repr(u32)]
479#[doc = "Camera tracking modes"]
480pub enum CameraTrackingMode {
481    #[doc = "Not tracking"]
482    CAMERA_TRACKING_MODE_NONE = 0,
483    #[doc = "Target is a point"]
484    CAMERA_TRACKING_MODE_POINT = 1,
485    #[doc = "Target is a rectangle"]
486    CAMERA_TRACKING_MODE_RECTANGLE = 2,
487}
488impl CameraTrackingMode {
489    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
490}
491impl Default for CameraTrackingMode {
492    fn default() -> Self {
493        Self::DEFAULT
494    }
495}
496#[cfg_attr(feature = "ts", derive(TS))]
497#[cfg_attr(feature = "ts", ts(export))]
498#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
500#[cfg_attr(feature = "serde", serde(tag = "type"))]
501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
502#[repr(u32)]
503#[doc = "Camera tracking status flags"]
504pub enum CameraTrackingStatusFlags {
505    #[doc = "Camera is not tracking"]
506    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
507    #[doc = "Camera is tracking"]
508    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
509    #[doc = "Camera tracking in error state"]
510    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
511}
512impl CameraTrackingStatusFlags {
513    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
514}
515impl Default for CameraTrackingStatusFlags {
516    fn default() -> Self {
517        Self::DEFAULT
518    }
519}
520bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
521impl CameraTrackingTargetData {
522    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
523}
524impl Default for CameraTrackingTargetData {
525    fn default() -> Self {
526        Self::DEFAULT
527    }
528}
529#[cfg_attr(feature = "ts", derive(TS))]
530#[cfg_attr(feature = "ts", ts(export))]
531#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
533#[cfg_attr(feature = "serde", serde(tag = "type"))]
534#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
535#[repr(u32)]
536#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
537pub enum CameraZoomType {
538    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
539    ZOOM_TYPE_STEP = 0,
540    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
541    ZOOM_TYPE_CONTINUOUS = 1,
542    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
543    ZOOM_TYPE_RANGE = 2,
544    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
545    ZOOM_TYPE_FOCAL_LENGTH = 3,
546    #[doc = "Zoom value as horizontal field of view in degrees."]
547    ZOOM_TYPE_HORIZONTAL_FOV = 4,
548}
549impl CameraZoomType {
550    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
551}
552impl Default for CameraZoomType {
553    fn default() -> Self {
554        Self::DEFAULT
555    }
556}
557#[cfg_attr(feature = "ts", derive(TS))]
558#[cfg_attr(feature = "ts", ts(export))]
559#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
560#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
561#[cfg_attr(feature = "serde", serde(tag = "type"))]
562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
563#[repr(u32)]
564pub enum CanFilterOp {
565    CAN_FILTER_REPLACE = 0,
566    CAN_FILTER_ADD = 1,
567    CAN_FILTER_REMOVE = 2,
568}
569impl CanFilterOp {
570    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
571}
572impl Default for CanFilterOp {
573    fn default() -> Self {
574        Self::DEFAULT
575    }
576}
577#[cfg_attr(feature = "ts", derive(TS))]
578#[cfg_attr(feature = "ts", ts(export))]
579#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
581#[cfg_attr(feature = "serde", serde(tag = "type"))]
582#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
583#[repr(u32)]
584#[doc = "Possible responses from a CELLULAR_CONFIG message."]
585pub enum CellularConfigResponse {
586    #[doc = "Changes accepted."]
587    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
588    #[doc = "Invalid APN."]
589    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
590    #[doc = "Invalid PIN."]
591    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
592    #[doc = "Changes rejected."]
593    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
594    #[doc = "PUK is required to unblock SIM card."]
595    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
596}
597impl CellularConfigResponse {
598    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
599}
600impl Default for CellularConfigResponse {
601    fn default() -> Self {
602        Self::DEFAULT
603    }
604}
605#[cfg_attr(feature = "ts", derive(TS))]
606#[cfg_attr(feature = "ts", ts(export))]
607#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
609#[cfg_attr(feature = "serde", serde(tag = "type"))]
610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
611#[repr(u32)]
612#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
613pub enum CellularNetworkFailedReason {
614    #[doc = "No error"]
615    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
616    #[doc = "Error state is unknown"]
617    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
618    #[doc = "SIM is required for the modem but missing"]
619    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
620    #[doc = "SIM is available, but not usable for connection"]
621    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
622}
623impl CellularNetworkFailedReason {
624    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
625}
626impl Default for CellularNetworkFailedReason {
627    fn default() -> Self {
628        Self::DEFAULT
629    }
630}
631#[cfg_attr(feature = "ts", derive(TS))]
632#[cfg_attr(feature = "ts", ts(export))]
633#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
635#[cfg_attr(feature = "serde", serde(tag = "type"))]
636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
637#[repr(u32)]
638#[doc = "Cellular network radio type"]
639pub enum CellularNetworkRadioType {
640    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
641    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
642    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
643    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
644    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
645}
646impl CellularNetworkRadioType {
647    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
648}
649impl Default for CellularNetworkRadioType {
650    fn default() -> Self {
651        Self::DEFAULT
652    }
653}
654#[cfg_attr(feature = "ts", derive(TS))]
655#[cfg_attr(feature = "ts", ts(export))]
656#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
658#[cfg_attr(feature = "serde", serde(tag = "type"))]
659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
660#[repr(u32)]
661#[doc = "These flags encode the cellular network status"]
662pub enum CellularStatusFlag {
663    #[doc = "State unknown or not reportable."]
664    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
665    #[doc = "Modem is unusable"]
666    CELLULAR_STATUS_FLAG_FAILED = 1,
667    #[doc = "Modem is being initialized"]
668    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
669    #[doc = "Modem is locked"]
670    CELLULAR_STATUS_FLAG_LOCKED = 3,
671    #[doc = "Modem is not enabled and is powered down"]
672    CELLULAR_STATUS_FLAG_DISABLED = 4,
673    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
674    CELLULAR_STATUS_FLAG_DISABLING = 5,
675    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
676    CELLULAR_STATUS_FLAG_ENABLING = 6,
677    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
678    CELLULAR_STATUS_FLAG_ENABLED = 7,
679    #[doc = "Modem is searching for a network provider to register"]
680    CELLULAR_STATUS_FLAG_SEARCHING = 8,
681    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
682    CELLULAR_STATUS_FLAG_REGISTERED = 9,
683    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
684    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
685    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
686    CELLULAR_STATUS_FLAG_CONNECTING = 11,
687    #[doc = "One or more packet data bearers is active and connected"]
688    CELLULAR_STATUS_FLAG_CONNECTED = 12,
689}
690impl CellularStatusFlag {
691    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
692}
693impl Default for CellularStatusFlag {
694    fn default() -> Self {
695        Self::DEFAULT
696    }
697}
698#[cfg_attr(feature = "ts", derive(TS))]
699#[cfg_attr(feature = "ts", ts(export))]
700#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
702#[cfg_attr(feature = "serde", serde(tag = "type"))]
703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
704#[repr(u32)]
705#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
706pub enum CompMetadataType {
707    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
708    COMP_METADATA_TYPE_GENERAL = 0,
709    #[doc = "Parameter meta data."]
710    COMP_METADATA_TYPE_PARAMETER = 1,
711    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
712    COMP_METADATA_TYPE_COMMANDS = 2,
713    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
714    COMP_METADATA_TYPE_PERIPHERALS = 3,
715    #[doc = "Meta data for the events interface."]
716    COMP_METADATA_TYPE_EVENTS = 4,
717    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
718    COMP_METADATA_TYPE_ACTUATORS = 5,
719}
720impl CompMetadataType {
721    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
722}
723impl Default for CompMetadataType {
724    fn default() -> Self {
725        Self::DEFAULT
726    }
727}
728#[cfg_attr(feature = "ts", derive(TS))]
729#[cfg_attr(feature = "ts", ts(export))]
730#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
732#[cfg_attr(feature = "serde", serde(tag = "type"))]
733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
734#[repr(u32)]
735#[doc = "Indicates the ESC connection type."]
736pub enum EscConnectionType {
737    #[doc = "Traditional PPM ESC."]
738    ESC_CONNECTION_TYPE_PPM = 0,
739    #[doc = "Serial Bus connected ESC."]
740    ESC_CONNECTION_TYPE_SERIAL = 1,
741    #[doc = "One Shot PPM ESC."]
742    ESC_CONNECTION_TYPE_ONESHOT = 2,
743    #[doc = "I2C ESC."]
744    ESC_CONNECTION_TYPE_I2C = 3,
745    #[doc = "CAN-Bus ESC."]
746    ESC_CONNECTION_TYPE_CAN = 4,
747    #[doc = "DShot ESC."]
748    ESC_CONNECTION_TYPE_DSHOT = 5,
749}
750impl EscConnectionType {
751    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
752}
753impl Default for EscConnectionType {
754    fn default() -> Self {
755        Self::DEFAULT
756    }
757}
758bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
759impl EscFailureFlags {
760    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
761}
762impl Default for EscFailureFlags {
763    fn default() -> Self {
764        Self::DEFAULT
765    }
766}
767bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
768impl EstimatorStatusFlags {
769    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
770}
771impl Default for EstimatorStatusFlags {
772    fn default() -> Self {
773        Self::DEFAULT
774    }
775}
776#[cfg_attr(feature = "ts", derive(TS))]
777#[cfg_attr(feature = "ts", ts(export))]
778#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
780#[cfg_attr(feature = "serde", serde(tag = "type"))]
781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
782#[repr(u32)]
783#[doc = "List of possible failure type to inject."]
784pub enum FailureType {
785    #[doc = "No failure injected, used to reset a previous failure."]
786    FAILURE_TYPE_OK = 0,
787    #[doc = "Sets unit off, so completely non-responsive."]
788    FAILURE_TYPE_OFF = 1,
789    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
790    FAILURE_TYPE_STUCK = 2,
791    #[doc = "Unit is reporting complete garbage."]
792    FAILURE_TYPE_GARBAGE = 3,
793    #[doc = "Unit is consistently wrong."]
794    FAILURE_TYPE_WRONG = 4,
795    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
796    FAILURE_TYPE_SLOW = 5,
797    #[doc = "Data of unit is delayed in time."]
798    FAILURE_TYPE_DELAYED = 6,
799    #[doc = "Unit is sometimes working, sometimes not."]
800    FAILURE_TYPE_INTERMITTENT = 7,
801}
802impl FailureType {
803    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
804}
805impl Default for FailureType {
806    fn default() -> Self {
807        Self::DEFAULT
808    }
809}
810#[cfg_attr(feature = "ts", derive(TS))]
811#[cfg_attr(feature = "ts", ts(export))]
812#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
813#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
814#[cfg_attr(feature = "serde", serde(tag = "type"))]
815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
816#[repr(u32)]
817#[doc = "List of possible units where failures can be injected."]
818pub enum FailureUnit {
819    FAILURE_UNIT_SENSOR_GYRO = 0,
820    FAILURE_UNIT_SENSOR_ACCEL = 1,
821    FAILURE_UNIT_SENSOR_MAG = 2,
822    FAILURE_UNIT_SENSOR_BARO = 3,
823    FAILURE_UNIT_SENSOR_GPS = 4,
824    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
825    FAILURE_UNIT_SENSOR_VIO = 6,
826    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
827    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
828    FAILURE_UNIT_SYSTEM_BATTERY = 100,
829    FAILURE_UNIT_SYSTEM_MOTOR = 101,
830    FAILURE_UNIT_SYSTEM_SERVO = 102,
831    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
832    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
833    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
834}
835impl FailureUnit {
836    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
837}
838impl Default for FailureUnit {
839    fn default() -> Self {
840        Self::DEFAULT
841    }
842}
843#[cfg_attr(feature = "ts", derive(TS))]
844#[cfg_attr(feature = "ts", ts(export))]
845#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
847#[cfg_attr(feature = "serde", serde(tag = "type"))]
848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
849#[repr(u32)]
850pub enum FenceBreach {
851    #[doc = "No last fence breach"]
852    FENCE_BREACH_NONE = 0,
853    #[doc = "Breached minimum altitude"]
854    FENCE_BREACH_MINALT = 1,
855    #[doc = "Breached maximum altitude"]
856    FENCE_BREACH_MAXALT = 2,
857    #[doc = "Breached fence boundary"]
858    FENCE_BREACH_BOUNDARY = 3,
859}
860impl FenceBreach {
861    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
862}
863impl Default for FenceBreach {
864    fn default() -> Self {
865        Self::DEFAULT
866    }
867}
868#[cfg_attr(feature = "ts", derive(TS))]
869#[cfg_attr(feature = "ts", ts(export))]
870#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
872#[cfg_attr(feature = "serde", serde(tag = "type"))]
873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
874#[repr(u32)]
875#[doc = "Actions being taken to mitigate/prevent fence breach"]
876pub enum FenceMitigate {
877    #[doc = "Unknown"]
878    FENCE_MITIGATE_UNKNOWN = 0,
879    #[doc = "No actions being taken"]
880    FENCE_MITIGATE_NONE = 1,
881    #[doc = "Velocity limiting active to prevent breach"]
882    FENCE_MITIGATE_VEL_LIMIT = 2,
883}
884impl FenceMitigate {
885    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
886}
887impl Default for FenceMitigate {
888    fn default() -> Self {
889        Self::DEFAULT
890    }
891}
892#[cfg_attr(feature = "ts", derive(TS))]
893#[cfg_attr(feature = "ts", ts(export))]
894#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
895#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
896#[cfg_attr(feature = "serde", serde(tag = "type"))]
897#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
898#[repr(u32)]
899#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
900pub enum FenceType {
901    #[doc = "Maximum altitude fence"]
902    FENCE_TYPE_ALT_MAX = 1,
903    #[doc = "Circle fence"]
904    FENCE_TYPE_CIRCLE = 2,
905    #[doc = "Polygon fence"]
906    FENCE_TYPE_POLYGON = 4,
907    #[doc = "Minimum altitude fence"]
908    FENCE_TYPE_ALT_MIN = 8,
909}
910impl FenceType {
911    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
912}
913impl Default for FenceType {
914    fn default() -> Self {
915        Self::DEFAULT
916    }
917}
918#[cfg_attr(feature = "ts", derive(TS))]
919#[cfg_attr(feature = "ts", ts(export))]
920#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
922#[cfg_attr(feature = "serde", serde(tag = "type"))]
923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
924#[repr(u32)]
925#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
926pub enum FirmwareVersionType {
927    #[doc = "development release"]
928    FIRMWARE_VERSION_TYPE_DEV = 0,
929    #[doc = "alpha release"]
930    FIRMWARE_VERSION_TYPE_ALPHA = 64,
931    #[doc = "beta release"]
932    FIRMWARE_VERSION_TYPE_BETA = 128,
933    #[doc = "release candidate"]
934    FIRMWARE_VERSION_TYPE_RC = 192,
935    #[doc = "official stable release"]
936    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
937}
938impl FirmwareVersionType {
939    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
940}
941impl Default for FirmwareVersionType {
942    fn default() -> Self {
943        Self::DEFAULT
944    }
945}
946bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
947impl GimbalDeviceCapFlags {
948    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
949}
950impl Default for GimbalDeviceCapFlags {
951    fn default() -> Self {
952        Self::DEFAULT
953    }
954}
955bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
956impl GimbalDeviceErrorFlags {
957    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
958}
959impl Default for GimbalDeviceErrorFlags {
960    fn default() -> Self {
961        Self::DEFAULT
962    }
963}
964bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
965impl GimbalDeviceFlags {
966    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
967}
968impl Default for GimbalDeviceFlags {
969    fn default() -> Self {
970        Self::DEFAULT
971    }
972}
973bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
974impl GimbalManagerCapFlags {
975    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
976}
977impl Default for GimbalManagerCapFlags {
978    fn default() -> Self {
979        Self::DEFAULT
980    }
981}
982bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
983impl GimbalManagerFlags {
984    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
985}
986impl Default for GimbalManagerFlags {
987    fn default() -> Self {
988        Self::DEFAULT
989    }
990}
991#[cfg_attr(feature = "ts", derive(TS))]
992#[cfg_attr(feature = "ts", ts(export))]
993#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
995#[cfg_attr(feature = "serde", serde(tag = "type"))]
996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
997#[repr(u32)]
998#[doc = "Type of GPS fix"]
999pub enum GpsFixType {
1000    #[doc = "No GPS connected"]
1001    GPS_FIX_TYPE_NO_GPS = 0,
1002    #[doc = "No position information, GPS is connected"]
1003    GPS_FIX_TYPE_NO_FIX = 1,
1004    #[doc = "2D position"]
1005    GPS_FIX_TYPE_2D_FIX = 2,
1006    #[doc = "3D position"]
1007    GPS_FIX_TYPE_3D_FIX = 3,
1008    #[doc = "DGPS/SBAS aided 3D position"]
1009    GPS_FIX_TYPE_DGPS = 4,
1010    #[doc = "RTK float, 3D position"]
1011    GPS_FIX_TYPE_RTK_FLOAT = 5,
1012    #[doc = "RTK Fixed, 3D position"]
1013    GPS_FIX_TYPE_RTK_FIXED = 6,
1014    #[doc = "Static fixed, typically used for base stations"]
1015    GPS_FIX_TYPE_STATIC = 7,
1016    #[doc = "PPP, 3D position."]
1017    GPS_FIX_TYPE_PPP = 8,
1018}
1019impl GpsFixType {
1020    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1021}
1022impl Default for GpsFixType {
1023    fn default() -> Self {
1024        Self::DEFAULT
1025    }
1026}
1027bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1028impl GpsInputIgnoreFlags {
1029    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1030}
1031impl Default for GpsInputIgnoreFlags {
1032    fn default() -> Self {
1033        Self::DEFAULT
1034    }
1035}
1036#[cfg_attr(feature = "ts", derive(TS))]
1037#[cfg_attr(feature = "ts", ts(export))]
1038#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1039#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1040#[cfg_attr(feature = "serde", serde(tag = "type"))]
1041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1042#[repr(u32)]
1043#[doc = "Gripper actions."]
1044pub enum GripperActions {
1045    #[doc = "Gripper release cargo."]
1046    GRIPPER_ACTION_RELEASE = 0,
1047    #[doc = "Gripper grab onto cargo."]
1048    GRIPPER_ACTION_GRAB = 1,
1049}
1050impl GripperActions {
1051    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1052}
1053impl Default for GripperActions {
1054    fn default() -> Self {
1055        Self::DEFAULT
1056    }
1057}
1058#[cfg_attr(feature = "ts", derive(TS))]
1059#[cfg_attr(feature = "ts", ts(export))]
1060#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1062#[cfg_attr(feature = "serde", serde(tag = "type"))]
1063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1064#[repr(u32)]
1065pub enum GsmLinkType {
1066    #[doc = "no service"]
1067    GSM_LINK_TYPE_NONE = 0,
1068    #[doc = "link type unknown"]
1069    GSM_LINK_TYPE_UNKNOWN = 1,
1070    #[doc = "2G (GSM/GRPS/EDGE) link"]
1071    GSM_LINK_TYPE_2G = 2,
1072    #[doc = "3G link (WCDMA/HSDPA/HSPA)"]
1073    GSM_LINK_TYPE_3G = 3,
1074    #[doc = "4G link (LTE)"]
1075    GSM_LINK_TYPE_4G = 4,
1076}
1077impl GsmLinkType {
1078    pub const DEFAULT: Self = Self::GSM_LINK_TYPE_NONE;
1079}
1080impl Default for GsmLinkType {
1081    fn default() -> Self {
1082        Self::DEFAULT
1083    }
1084}
1085#[cfg_attr(feature = "ts", derive(TS))]
1086#[cfg_attr(feature = "ts", ts(export))]
1087#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1088#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1089#[cfg_attr(feature = "serde", serde(tag = "type"))]
1090#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1091#[repr(u32)]
1092pub enum GsmModemType {
1093    #[doc = "not specified"]
1094    GSM_MODEM_TYPE_UNKNOWN = 0,
1095    #[doc = "HUAWEI LTE USB Stick E3372"]
1096    GSM_MODEM_TYPE_HUAWEI_E3372 = 1,
1097}
1098impl GsmModemType {
1099    pub const DEFAULT: Self = Self::GSM_MODEM_TYPE_UNKNOWN;
1100}
1101impl Default for GsmModemType {
1102    fn default() -> Self {
1103        Self::DEFAULT
1104    }
1105}
1106bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1107impl HighresImuUpdatedFlags {
1108    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1109}
1110impl Default for HighresImuUpdatedFlags {
1111    fn default() -> Self {
1112        Self::DEFAULT
1113    }
1114}
1115bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1116impl HilActuatorControlsFlags {
1117    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1118}
1119impl Default for HilActuatorControlsFlags {
1120    fn default() -> Self {
1121        Self::DEFAULT
1122    }
1123}
1124bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1125impl HilSensorUpdatedFlags {
1126    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1127}
1128impl Default for HilSensorUpdatedFlags {
1129    fn default() -> Self {
1130        Self::DEFAULT
1131    }
1132}
1133bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1134impl HlFailureFlag {
1135    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1136}
1137impl Default for HlFailureFlag {
1138    fn default() -> Self {
1139        Self::DEFAULT
1140    }
1141}
1142bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1143impl IlluminatorErrorFlags {
1144    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1145}
1146impl Default for IlluminatorErrorFlags {
1147    fn default() -> Self {
1148        Self::DEFAULT
1149    }
1150}
1151#[cfg_attr(feature = "ts", derive(TS))]
1152#[cfg_attr(feature = "ts", ts(export))]
1153#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1155#[cfg_attr(feature = "serde", serde(tag = "type"))]
1156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1157#[repr(u32)]
1158#[doc = "Modes of illuminator"]
1159pub enum IlluminatorMode {
1160    #[doc = "Illuminator mode is not specified/unknown"]
1161    ILLUMINATOR_MODE_UNKNOWN = 0,
1162    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1163    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1164    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1165    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1166}
1167impl IlluminatorMode {
1168    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1169}
1170impl Default for IlluminatorMode {
1171    fn default() -> Self {
1172        Self::DEFAULT
1173    }
1174}
1175#[cfg_attr(feature = "ts", derive(TS))]
1176#[cfg_attr(feature = "ts", ts(export))]
1177#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1178#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1179#[cfg_attr(feature = "serde", serde(tag = "type"))]
1180#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1181#[repr(u32)]
1182#[doc = "Type of landing target"]
1183pub enum LandingTargetType {
1184    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1185    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1186    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1187    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1188    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1189    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1190    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1191    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1192}
1193impl LandingTargetType {
1194    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1195}
1196impl Default for LandingTargetType {
1197    fn default() -> Self {
1198        Self::DEFAULT
1199    }
1200}
1201#[cfg_attr(feature = "ts", derive(TS))]
1202#[cfg_attr(feature = "ts", ts(export))]
1203#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1204#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1205#[cfg_attr(feature = "serde", serde(tag = "type"))]
1206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1207#[repr(u32)]
1208pub enum MagCalStatus {
1209    MAG_CAL_NOT_STARTED = 0,
1210    MAG_CAL_WAITING_TO_START = 1,
1211    MAG_CAL_RUNNING_STEP_ONE = 2,
1212    MAG_CAL_RUNNING_STEP_TWO = 3,
1213    MAG_CAL_SUCCESS = 4,
1214    MAG_CAL_FAILED = 5,
1215    MAG_CAL_BAD_ORIENTATION = 6,
1216    MAG_CAL_BAD_RADIUS = 7,
1217}
1218impl MagCalStatus {
1219    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1220}
1221impl Default for MagCalStatus {
1222    fn default() -> Self {
1223        Self::DEFAULT
1224    }
1225}
1226#[cfg_attr(feature = "ts", derive(TS))]
1227#[cfg_attr(feature = "ts", ts(export))]
1228#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1229#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1230#[cfg_attr(feature = "serde", serde(tag = "type"))]
1231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1232#[repr(u32)]
1233pub enum MavArmAuthDeniedReason {
1234    #[doc = "Not a specific reason"]
1235    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1236    #[doc = "Authorizer will send the error as string to GCS"]
1237    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1238    #[doc = "At least one waypoint have a invalid value"]
1239    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1240    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1241    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1242    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1243    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1244    #[doc = "Weather is not good to fly"]
1245    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1246}
1247impl MavArmAuthDeniedReason {
1248    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1249}
1250impl Default for MavArmAuthDeniedReason {
1251    fn default() -> Self {
1252        Self::DEFAULT
1253    }
1254}
1255#[cfg_attr(feature = "ts", derive(TS))]
1256#[cfg_attr(feature = "ts", ts(export))]
1257#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1258#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1259#[cfg_attr(feature = "serde", serde(tag = "type"))]
1260#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1261#[repr(u32)]
1262#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1263pub enum MavAutopilot {
1264    #[doc = "Generic autopilot, full support for everything"]
1265    MAV_AUTOPILOT_GENERIC = 0,
1266    #[doc = "Reserved for future use."]
1267    MAV_AUTOPILOT_RESERVED = 1,
1268    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1269    MAV_AUTOPILOT_SLUGS = 2,
1270    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1271    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1272    #[doc = "OpenPilot, <http://openpilot.org>"]
1273    MAV_AUTOPILOT_OPENPILOT = 4,
1274    #[doc = "Generic autopilot only supporting simple waypoints"]
1275    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1276    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1277    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1278    #[doc = "Generic autopilot supporting the full mission command set"]
1279    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1280    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1281    MAV_AUTOPILOT_INVALID = 8,
1282    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1283    MAV_AUTOPILOT_PPZ = 9,
1284    #[doc = "UAV Dev Board"]
1285    MAV_AUTOPILOT_UDB = 10,
1286    #[doc = "FlexiPilot"]
1287    MAV_AUTOPILOT_FP = 11,
1288    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1289    MAV_AUTOPILOT_PX4 = 12,
1290    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1291    MAV_AUTOPILOT_SMACCMPILOT = 13,
1292    #[doc = "AutoQuad -- <http://autoquad.org>"]
1293    MAV_AUTOPILOT_AUTOQUAD = 14,
1294    #[doc = "Armazila -- <http://armazila.com>"]
1295    MAV_AUTOPILOT_ARMAZILA = 15,
1296    #[doc = "Aerob -- <http://aerob.ru>"]
1297    MAV_AUTOPILOT_AEROB = 16,
1298    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1299    MAV_AUTOPILOT_ASLUAV = 17,
1300    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1301    MAV_AUTOPILOT_SMARTAP = 18,
1302    #[doc = "AirRails - <http://uaventure.com>"]
1303    MAV_AUTOPILOT_AIRRAILS = 19,
1304    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1305    MAV_AUTOPILOT_REFLEX = 20,
1306}
1307impl MavAutopilot {
1308    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1309}
1310impl Default for MavAutopilot {
1311    fn default() -> Self {
1312        Self::DEFAULT
1313    }
1314}
1315#[cfg_attr(feature = "ts", derive(TS))]
1316#[cfg_attr(feature = "ts", ts(export))]
1317#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1318#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1319#[cfg_attr(feature = "serde", serde(tag = "type"))]
1320#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1321#[repr(u32)]
1322#[doc = "Enumeration for battery charge states."]
1323pub enum MavBatteryChargeState {
1324    #[doc = "Low battery state is not provided"]
1325    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1326    #[doc = "Battery is not in low state. Normal operation."]
1327    MAV_BATTERY_CHARGE_STATE_OK = 1,
1328    #[doc = "Battery state is low, warn and monitor close."]
1329    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1330    #[doc = "Battery state is critical, return or abort immediately."]
1331    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1332    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1333    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1334    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1335    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1336    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1337    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1338    #[doc = "Battery is charging."]
1339    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1340}
1341impl MavBatteryChargeState {
1342    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1343}
1344impl Default for MavBatteryChargeState {
1345    fn default() -> Self {
1346        Self::DEFAULT
1347    }
1348}
1349bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1350impl MavBatteryFault {
1351    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1352}
1353impl Default for MavBatteryFault {
1354    fn default() -> Self {
1355        Self::DEFAULT
1356    }
1357}
1358#[cfg_attr(feature = "ts", derive(TS))]
1359#[cfg_attr(feature = "ts", ts(export))]
1360#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1361#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1362#[cfg_attr(feature = "serde", serde(tag = "type"))]
1363#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1364#[repr(u32)]
1365#[doc = "Enumeration of battery functions"]
1366pub enum MavBatteryFunction {
1367    #[doc = "Battery function is unknown"]
1368    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1369    #[doc = "Battery supports all flight systems"]
1370    MAV_BATTERY_FUNCTION_ALL = 1,
1371    #[doc = "Battery for the propulsion system"]
1372    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1373    #[doc = "Avionics battery"]
1374    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1375    #[doc = "Payload battery"]
1376    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1377}
1378impl MavBatteryFunction {
1379    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1380}
1381impl Default for MavBatteryFunction {
1382    fn default() -> Self {
1383        Self::DEFAULT
1384    }
1385}
1386#[cfg_attr(feature = "ts", derive(TS))]
1387#[cfg_attr(feature = "ts", ts(export))]
1388#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1389#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1390#[cfg_attr(feature = "serde", serde(tag = "type"))]
1391#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1392#[repr(u32)]
1393#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1394pub enum MavBatteryMode {
1395    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1396    MAV_BATTERY_MODE_UNKNOWN = 0,
1397    #[doc = "Battery is auto discharging (towards storage level)."]
1398    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1399    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1400    MAV_BATTERY_MODE_HOT_SWAP = 2,
1401}
1402impl MavBatteryMode {
1403    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1404}
1405impl Default for MavBatteryMode {
1406    fn default() -> Self {
1407        Self::DEFAULT
1408    }
1409}
1410#[cfg_attr(feature = "ts", derive(TS))]
1411#[cfg_attr(feature = "ts", ts(export))]
1412#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1413#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1414#[cfg_attr(feature = "serde", serde(tag = "type"))]
1415#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1416#[repr(u32)]
1417#[doc = "Enumeration of battery types"]
1418pub enum MavBatteryType {
1419    #[doc = "Not specified."]
1420    MAV_BATTERY_TYPE_UNKNOWN = 0,
1421    #[doc = "Lithium polymer battery"]
1422    MAV_BATTERY_TYPE_LIPO = 1,
1423    #[doc = "Lithium-iron-phosphate battery"]
1424    MAV_BATTERY_TYPE_LIFE = 2,
1425    #[doc = "Lithium-ION battery"]
1426    MAV_BATTERY_TYPE_LION = 3,
1427    #[doc = "Nickel metal hydride battery"]
1428    MAV_BATTERY_TYPE_NIMH = 4,
1429}
1430impl MavBatteryType {
1431    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1432}
1433impl Default for MavBatteryType {
1434    fn default() -> Self {
1435        Self::DEFAULT
1436    }
1437}
1438#[cfg_attr(feature = "ts", derive(TS))]
1439#[cfg_attr(feature = "ts", ts(export))]
1440#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1441#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1442#[cfg_attr(feature = "serde", serde(tag = "type"))]
1443#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1444#[repr(u32)]
1445#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1446pub enum MavCmd {
1447    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1448    MAV_CMD_NAV_WAYPOINT = 16,
1449    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1450    MAV_CMD_NAV_LOITER_UNLIM = 17,
1451    #[doc = "Loiter around this waypoint for X turns"]
1452    MAV_CMD_NAV_LOITER_TURNS = 18,
1453    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1454    MAV_CMD_NAV_LOITER_TIME = 19,
1455    #[doc = "Return to launch location"]
1456    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1457    #[doc = "Land at location."]
1458    MAV_CMD_NAV_LAND = 21,
1459    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1460    MAV_CMD_NAV_TAKEOFF = 22,
1461    #[doc = "Land at local position (local frame only)"]
1462    MAV_CMD_NAV_LAND_LOCAL = 23,
1463    #[doc = "Takeoff from local position (local frame only)"]
1464    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1465    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1466    MAV_CMD_NAV_FOLLOW = 25,
1467    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1468    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1469    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1470    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1471    #[doc = "Begin following a target"]
1472    MAV_CMD_DO_FOLLOW = 32,
1473    #[doc = "Reposition the MAV after a follow target command has been sent"]
1474    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1475    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1476    MAV_CMD_DO_ORBIT = 34,
1477    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1478    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1479    MAV_CMD_NAV_ROI = 80,
1480    #[doc = "Control autonomous path planning on the MAV."]
1481    MAV_CMD_NAV_PATHPLANNING = 81,
1482    #[doc = "Navigate to waypoint using a spline path."]
1483    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1484    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1485    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1486    #[doc = "Land using VTOL mode"]
1487    MAV_CMD_NAV_VTOL_LAND = 85,
1488    #[doc = "hand control over to an external controller"]
1489    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1490    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1491    MAV_CMD_NAV_DELAY = 93,
1492    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1493    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1494    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1495    MAV_CMD_NAV_LAST = 95,
1496    #[doc = "Delay mission state machine."]
1497    MAV_CMD_CONDITION_DELAY = 112,
1498    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1499    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1500    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1501    MAV_CMD_CONDITION_DISTANCE = 114,
1502    #[doc = "Reach a certain target angle."]
1503    MAV_CMD_CONDITION_YAW = 115,
1504    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1505    MAV_CMD_CONDITION_LAST = 159,
1506    #[doc = "Set system mode."]
1507    MAV_CMD_DO_SET_MODE = 176,
1508    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1509    MAV_CMD_DO_JUMP = 177,
1510    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1511    MAV_CMD_DO_CHANGE_SPEED = 178,
1512    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1513    MAV_CMD_DO_SET_HOME = 179,
1514    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1515    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1516    MAV_CMD_DO_SET_PARAMETER = 180,
1517    #[doc = "Set a relay to a condition."]
1518    MAV_CMD_DO_SET_RELAY = 181,
1519    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1520    MAV_CMD_DO_REPEAT_RELAY = 182,
1521    #[doc = "Set a servo to a desired PWM value."]
1522    MAV_CMD_DO_SET_SERVO = 183,
1523    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1524    MAV_CMD_DO_REPEAT_SERVO = 184,
1525    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1526    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1527    #[doc = "Change altitude set point."]
1528    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1529    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1530    MAV_CMD_DO_SET_ACTUATOR = 187,
1531    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1532    MAV_CMD_DO_RETURN_PATH_START = 188,
1533    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1534    MAV_CMD_DO_LAND_START = 189,
1535    #[doc = "Mission command to perform a landing from a rally point."]
1536    MAV_CMD_DO_RALLY_LAND = 190,
1537    #[doc = "Mission command to safely abort an autonomous landing."]
1538    MAV_CMD_DO_GO_AROUND = 191,
1539    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1540    MAV_CMD_DO_REPOSITION = 192,
1541    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1542    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1543    #[doc = "Set moving direction to forward or reverse."]
1544    MAV_CMD_DO_SET_REVERSE = 194,
1545    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1546    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1547    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1548    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1549    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1550    MAV_CMD_DO_SET_ROI_NONE = 197,
1551    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1552    MAV_CMD_DO_SET_ROI_SYSID = 198,
1553    #[doc = "Control onboard camera system."]
1554    MAV_CMD_DO_CONTROL_VIDEO = 200,
1555    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1556    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1557    MAV_CMD_DO_SET_ROI = 201,
1558    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1559    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1560    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1561    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1562    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1563    #[doc = "Mission command to configure a camera or antenna mount"]
1564    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1565    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1566    #[doc = "Mission command to control a camera or antenna mount"]
1567    MAV_CMD_DO_MOUNT_CONTROL = 205,
1568    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1569    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1570    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1571    MAV_CMD_DO_FENCE_ENABLE = 207,
1572    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1573    MAV_CMD_DO_PARACHUTE = 208,
1574    #[doc = "Command to perform motor test."]
1575    MAV_CMD_DO_MOTOR_TEST = 209,
1576    #[doc = "Change to/from inverted flight."]
1577    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1578    #[doc = "Mission command to operate a gripper."]
1579    MAV_CMD_DO_GRIPPER = 211,
1580    #[doc = "Enable/disable autotune."]
1581    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1582    #[doc = "Sets a desired vehicle turn angle and speed change."]
1583    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1584    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1585    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1586    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1587    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1588    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1589    #[doc = "set id of master controller"]
1590    MAV_CMD_DO_GUIDED_MASTER = 221,
1591    #[doc = "Set limits for external control"]
1592    MAV_CMD_DO_GUIDED_LIMITS = 222,
1593    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1594    MAV_CMD_DO_ENGINE_CONTROL = 223,
1595    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1596    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1597    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1598    MAV_CMD_DO_LAST = 240,
1599    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1600    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1601    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1602    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1603    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1604    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1605    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1606    MAV_CMD_PREFLIGHT_STORAGE = 245,
1607    #[doc = "Request the reboot or shutdown of system components."]
1608    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1609    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1610    MAV_CMD_OVERRIDE_GOTO = 252,
1611    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1612    MAV_CMD_OBLIQUE_SURVEY = 260,
1613    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1614    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1615    #[doc = "start running a mission"]
1616    MAV_CMD_MISSION_START = 300,
1617    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1618    MAV_CMD_ACTUATOR_TEST = 310,
1619    #[doc = "Actuator configuration command."]
1620    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1621    #[doc = "Arms / Disarms a component"]
1622    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1623    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1624    MAV_CMD_RUN_PREARM_CHECKS = 401,
1625    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1626    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1627    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1628    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1629    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1630    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1631    MAV_CMD_GET_HOME_POSITION = 410,
1632    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1633    MAV_CMD_INJECT_FAILURE = 420,
1634    #[doc = "Starts receiver pairing."]
1635    MAV_CMD_START_RX_PAIR = 500,
1636    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1637    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1638    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1639    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1640    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1641    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1642    MAV_CMD_REQUEST_MESSAGE = 512,
1643    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1644    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1645    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1646    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1647    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1648    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1649    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1650    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1651    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1652    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1653    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1654    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1655    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1656    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1657    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1658    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1659    MAV_CMD_STORAGE_FORMAT = 526,
1660    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1661    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1662    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1663    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1664    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1665    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1666    #[doc = "Reset all camera settings to Factory Default"]
1667    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1668    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1669    MAV_CMD_SET_CAMERA_MODE = 530,
1670    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1671    MAV_CMD_SET_CAMERA_ZOOM = 531,
1672    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1673    MAV_CMD_SET_CAMERA_FOCUS = 532,
1674    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1675    MAV_CMD_SET_STORAGE_USAGE = 533,
1676    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1677    MAV_CMD_SET_CAMERA_SOURCE = 534,
1678    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1679    MAV_CMD_JUMP_TAG = 600,
1680    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1681    MAV_CMD_DO_JUMP_TAG = 601,
1682    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1683    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1684    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1685    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1686    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1687    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1688    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1689    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1690    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1691    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1692    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1693    #[doc = "Enable or disable on-board camera triggering system."]
1694    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1695    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1696    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1697    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1698    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1699    #[doc = "Stops ongoing tracking."]
1700    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1701    #[doc = "Starts video capture (recording)."]
1702    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1703    #[doc = "Stop the current video capture (recording)."]
1704    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1705    #[doc = "Start video streaming"]
1706    MAV_CMD_VIDEO_START_STREAMING = 2502,
1707    #[doc = "Stop the given video stream"]
1708    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1709    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1710    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1711    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1712    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1713    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1714    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1715    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1716    MAV_CMD_LOGGING_START = 2510,
1717    #[doc = "Request to stop streaming log data over MAVLink"]
1718    MAV_CMD_LOGGING_STOP = 2511,
1719    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1720    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1721    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1722    #[doc = "Create a panorama at the current position"]
1723    MAV_CMD_PANORAMA_CREATE = 2800,
1724    #[doc = "Request VTOL transition"]
1725    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1726    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1727    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1728    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1729    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1730    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1731    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1732    #[doc = "Delay mission state machine until gate has been reached."]
1733    MAV_CMD_CONDITION_GATE = 4501,
1734    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1735    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1736    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1737    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1738    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1739    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1740    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1741    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1742    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1743    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1744    #[doc = "Rally point. You can have multiple rally points defined."]
1745    MAV_CMD_NAV_RALLY_POINT = 5100,
1746    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1747    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1748    #[doc = "Change state of safety switch."]
1749    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1750    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1751    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1752    #[deprecated = "  (Deprecated since 2021-06)"]
1753    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1754    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1755    #[deprecated = "  (Deprecated since 2021-06)"]
1756    #[doc = "Control the payload deployment."]
1757    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1758    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1759    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1760    #[doc = "Command to operate winch."]
1761    MAV_CMD_DO_WINCH = 42600,
1762    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1763    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1764    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1765    MAV_CMD_WAYPOINT_USER_1 = 31000,
1766    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1767    MAV_CMD_WAYPOINT_USER_2 = 31001,
1768    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1769    MAV_CMD_WAYPOINT_USER_3 = 31002,
1770    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1771    MAV_CMD_WAYPOINT_USER_4 = 31003,
1772    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1773    MAV_CMD_WAYPOINT_USER_5 = 31004,
1774    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1775    MAV_CMD_SPATIAL_USER_1 = 31005,
1776    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1777    MAV_CMD_SPATIAL_USER_2 = 31006,
1778    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1779    MAV_CMD_SPATIAL_USER_3 = 31007,
1780    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1781    MAV_CMD_SPATIAL_USER_4 = 31008,
1782    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1783    MAV_CMD_SPATIAL_USER_5 = 31009,
1784    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1785    MAV_CMD_USER_1 = 31010,
1786    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1787    MAV_CMD_USER_2 = 31011,
1788    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1789    MAV_CMD_USER_3 = 31012,
1790    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1791    MAV_CMD_USER_4 = 31013,
1792    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1793    MAV_CMD_USER_5 = 31014,
1794    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1795    MAV_CMD_CAN_FORWARD = 32000,
1796    #[doc = "Mission command to reset Maximum Power Point Tracker (MPPT)"]
1797    MAV_CMD_RESET_MPPT = 40001,
1798    #[doc = "Mission command to perform a power cycle on payload"]
1799    MAV_CMD_PAYLOAD_CONTROL = 40002,
1800}
1801impl MavCmd {
1802    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1803}
1804impl Default for MavCmd {
1805    fn default() -> Self {
1806        Self::DEFAULT
1807    }
1808}
1809#[cfg_attr(feature = "ts", derive(TS))]
1810#[cfg_attr(feature = "ts", ts(export))]
1811#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1813#[cfg_attr(feature = "serde", serde(tag = "type"))]
1814#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1815#[repr(u32)]
1816#[doc = "Possible actions an aircraft can take to avoid a collision."]
1817pub enum MavCollisionAction {
1818    #[doc = "Ignore any potential collisions"]
1819    MAV_COLLISION_ACTION_NONE = 0,
1820    #[doc = "Report potential collision"]
1821    MAV_COLLISION_ACTION_REPORT = 1,
1822    #[doc = "Ascend or Descend to avoid threat"]
1823    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1824    #[doc = "Move horizontally to avoid threat"]
1825    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1826    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1827    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1828    #[doc = "Aircraft to fly directly back to its launch point"]
1829    MAV_COLLISION_ACTION_RTL = 5,
1830    #[doc = "Aircraft to stop in place"]
1831    MAV_COLLISION_ACTION_HOVER = 6,
1832}
1833impl MavCollisionAction {
1834    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1835}
1836impl Default for MavCollisionAction {
1837    fn default() -> Self {
1838        Self::DEFAULT
1839    }
1840}
1841#[cfg_attr(feature = "ts", derive(TS))]
1842#[cfg_attr(feature = "ts", ts(export))]
1843#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1845#[cfg_attr(feature = "serde", serde(tag = "type"))]
1846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1847#[repr(u32)]
1848#[doc = "Source of information about this collision."]
1849pub enum MavCollisionSrc {
1850    #[doc = "ID field references ADSB_VEHICLE packets"]
1851    MAV_COLLISION_SRC_ADSB = 0,
1852    #[doc = "ID field references MAVLink SRC ID"]
1853    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1854}
1855impl MavCollisionSrc {
1856    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1857}
1858impl Default for MavCollisionSrc {
1859    fn default() -> Self {
1860        Self::DEFAULT
1861    }
1862}
1863#[cfg_attr(feature = "ts", derive(TS))]
1864#[cfg_attr(feature = "ts", ts(export))]
1865#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1867#[cfg_attr(feature = "serde", serde(tag = "type"))]
1868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1869#[repr(u32)]
1870#[doc = "Aircraft-rated danger from this threat."]
1871pub enum MavCollisionThreatLevel {
1872    #[doc = "Not a threat"]
1873    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1874    #[doc = "Craft is mildly concerned about this threat"]
1875    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1876    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1877    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1878}
1879impl MavCollisionThreatLevel {
1880    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1881}
1882impl Default for MavCollisionThreatLevel {
1883    fn default() -> Self {
1884        Self::DEFAULT
1885    }
1886}
1887#[cfg_attr(feature = "ts", derive(TS))]
1888#[cfg_attr(feature = "ts", ts(export))]
1889#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1890#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1891#[cfg_attr(feature = "serde", serde(tag = "type"))]
1892#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1893#[repr(u32)]
1894#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1895pub enum MavComponent {
1896    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1897    MAV_COMP_ID_ALL = 0,
1898    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1899    MAV_COMP_ID_AUTOPILOT1 = 1,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER1 = 25,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER2 = 26,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER3 = 27,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER4 = 28,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER5 = 29,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER6 = 30,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER7 = 31,
1914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1915    MAV_COMP_ID_USER8 = 32,
1916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1917    MAV_COMP_ID_USER9 = 33,
1918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1919    MAV_COMP_ID_USER10 = 34,
1920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1921    MAV_COMP_ID_USER11 = 35,
1922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1923    MAV_COMP_ID_USER12 = 36,
1924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1925    MAV_COMP_ID_USER13 = 37,
1926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1927    MAV_COMP_ID_USER14 = 38,
1928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1929    MAV_COMP_ID_USER15 = 39,
1930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1931    MAV_COMP_ID_USER16 = 40,
1932    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1933    MAV_COMP_ID_USER17 = 41,
1934    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1935    MAV_COMP_ID_USER18 = 42,
1936    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1937    MAV_COMP_ID_USER19 = 43,
1938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1939    MAV_COMP_ID_USER20 = 44,
1940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1941    MAV_COMP_ID_USER21 = 45,
1942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1943    MAV_COMP_ID_USER22 = 46,
1944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1945    MAV_COMP_ID_USER23 = 47,
1946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1947    MAV_COMP_ID_USER24 = 48,
1948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1949    MAV_COMP_ID_USER25 = 49,
1950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1951    MAV_COMP_ID_USER26 = 50,
1952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1953    MAV_COMP_ID_USER27 = 51,
1954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1955    MAV_COMP_ID_USER28 = 52,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER29 = 53,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER30 = 54,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER31 = 55,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER32 = 56,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER33 = 57,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER34 = 58,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER35 = 59,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER36 = 60,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER37 = 61,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER38 = 62,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER39 = 63,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER40 = 64,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER41 = 65,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER42 = 66,
1984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1985    MAV_COMP_ID_USER43 = 67,
1986    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1987    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER45 = 69,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER46 = 70,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER47 = 71,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER48 = 72,
1996    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1997    MAV_COMP_ID_USER49 = 73,
1998    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1999    MAV_COMP_ID_USER50 = 74,
2000    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2001    MAV_COMP_ID_USER51 = 75,
2002    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2003    MAV_COMP_ID_USER52 = 76,
2004    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2005    MAV_COMP_ID_USER53 = 77,
2006    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2007    MAV_COMP_ID_USER54 = 78,
2008    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2009    MAV_COMP_ID_USER55 = 79,
2010    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2011    MAV_COMP_ID_USER56 = 80,
2012    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2013    MAV_COMP_ID_USER57 = 81,
2014    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2015    MAV_COMP_ID_USER58 = 82,
2016    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2017    MAV_COMP_ID_USER59 = 83,
2018    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2019    MAV_COMP_ID_USER60 = 84,
2020    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2021    MAV_COMP_ID_USER61 = 85,
2022    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2023    MAV_COMP_ID_USER62 = 86,
2024    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2025    MAV_COMP_ID_USER63 = 87,
2026    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2027    MAV_COMP_ID_USER64 = 88,
2028    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2029    MAV_COMP_ID_USER65 = 89,
2030    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2031    MAV_COMP_ID_USER66 = 90,
2032    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2033    MAV_COMP_ID_USER67 = 91,
2034    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2035    MAV_COMP_ID_USER68 = 92,
2036    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2037    MAV_COMP_ID_USER69 = 93,
2038    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2039    MAV_COMP_ID_USER70 = 94,
2040    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2041    MAV_COMP_ID_USER71 = 95,
2042    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2043    MAV_COMP_ID_USER72 = 96,
2044    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2045    MAV_COMP_ID_USER73 = 97,
2046    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2047    MAV_COMP_ID_USER74 = 98,
2048    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2049    MAV_COMP_ID_USER75 = 99,
2050    #[doc = "Camera #1."]
2051    MAV_COMP_ID_CAMERA = 100,
2052    #[doc = "Camera #2."]
2053    MAV_COMP_ID_CAMERA2 = 101,
2054    #[doc = "Camera #3."]
2055    MAV_COMP_ID_CAMERA3 = 102,
2056    #[doc = "Camera #4."]
2057    MAV_COMP_ID_CAMERA4 = 103,
2058    #[doc = "Camera #5."]
2059    MAV_COMP_ID_CAMERA5 = 104,
2060    #[doc = "Camera #6."]
2061    MAV_COMP_ID_CAMERA6 = 105,
2062    #[doc = "Servo #1."]
2063    MAV_COMP_ID_SERVO1 = 140,
2064    #[doc = "Servo #2."]
2065    MAV_COMP_ID_SERVO2 = 141,
2066    #[doc = "Servo #3."]
2067    MAV_COMP_ID_SERVO3 = 142,
2068    #[doc = "Servo #4."]
2069    MAV_COMP_ID_SERVO4 = 143,
2070    #[doc = "Servo #5."]
2071    MAV_COMP_ID_SERVO5 = 144,
2072    #[doc = "Servo #6."]
2073    MAV_COMP_ID_SERVO6 = 145,
2074    #[doc = "Servo #7."]
2075    MAV_COMP_ID_SERVO7 = 146,
2076    #[doc = "Servo #8."]
2077    MAV_COMP_ID_SERVO8 = 147,
2078    #[doc = "Servo #9."]
2079    MAV_COMP_ID_SERVO9 = 148,
2080    #[doc = "Servo #10."]
2081    MAV_COMP_ID_SERVO10 = 149,
2082    #[doc = "Servo #11."]
2083    MAV_COMP_ID_SERVO11 = 150,
2084    #[doc = "Servo #12."]
2085    MAV_COMP_ID_SERVO12 = 151,
2086    #[doc = "Servo #13."]
2087    MAV_COMP_ID_SERVO13 = 152,
2088    #[doc = "Servo #14."]
2089    MAV_COMP_ID_SERVO14 = 153,
2090    #[doc = "Gimbal #1."]
2091    MAV_COMP_ID_GIMBAL = 154,
2092    #[doc = "Logging component."]
2093    MAV_COMP_ID_LOG = 155,
2094    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2095    MAV_COMP_ID_ADSB = 156,
2096    #[doc = "On Screen Display (OSD) devices for video links."]
2097    MAV_COMP_ID_OSD = 157,
2098    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2099    MAV_COMP_ID_PERIPHERAL = 158,
2100    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2101    #[doc = "Gimbal ID for QX1."]
2102    MAV_COMP_ID_QX1_GIMBAL = 159,
2103    #[doc = "FLARM collision alert component."]
2104    MAV_COMP_ID_FLARM = 160,
2105    #[doc = "Parachute component."]
2106    MAV_COMP_ID_PARACHUTE = 161,
2107    #[doc = "Winch component."]
2108    MAV_COMP_ID_WINCH = 169,
2109    #[doc = "Gimbal #2."]
2110    MAV_COMP_ID_GIMBAL2 = 171,
2111    #[doc = "Gimbal #3."]
2112    MAV_COMP_ID_GIMBAL3 = 172,
2113    #[doc = "Gimbal #4"]
2114    MAV_COMP_ID_GIMBAL4 = 173,
2115    #[doc = "Gimbal #5."]
2116    MAV_COMP_ID_GIMBAL5 = 174,
2117    #[doc = "Gimbal #6."]
2118    MAV_COMP_ID_GIMBAL6 = 175,
2119    #[doc = "Battery #1."]
2120    MAV_COMP_ID_BATTERY = 180,
2121    #[doc = "Battery #2."]
2122    MAV_COMP_ID_BATTERY2 = 181,
2123    #[doc = "CAN over MAVLink client."]
2124    MAV_COMP_ID_MAVCAN = 189,
2125    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2126    MAV_COMP_ID_MISSIONPLANNER = 190,
2127    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2128    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2129    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2130    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2131    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2132    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2133    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2134    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2135    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2136    MAV_COMP_ID_PATHPLANNER = 195,
2137    #[doc = "Component that plans a collision free path between two points."]
2138    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2139    #[doc = "Component that provides position estimates using VIO techniques."]
2140    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2141    #[doc = "Component that manages pairing of vehicle and GCS."]
2142    MAV_COMP_ID_PAIRING_MANAGER = 198,
2143    #[doc = "Inertial Measurement Unit (IMU) #1."]
2144    MAV_COMP_ID_IMU = 200,
2145    #[doc = "Inertial Measurement Unit (IMU) #2."]
2146    MAV_COMP_ID_IMU_2 = 201,
2147    #[doc = "Inertial Measurement Unit (IMU) #3."]
2148    MAV_COMP_ID_IMU_3 = 202,
2149    #[doc = "GPS #1."]
2150    MAV_COMP_ID_GPS = 220,
2151    #[doc = "GPS #2."]
2152    MAV_COMP_ID_GPS2 = 221,
2153    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2154    MAV_COMP_ID_ODID_TXRX_1 = 236,
2155    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2156    MAV_COMP_ID_ODID_TXRX_2 = 237,
2157    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2158    MAV_COMP_ID_ODID_TXRX_3 = 238,
2159    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2160    MAV_COMP_ID_UDP_BRIDGE = 240,
2161    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2162    MAV_COMP_ID_UART_BRIDGE = 241,
2163    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2164    MAV_COMP_ID_TUNNEL_NODE = 242,
2165    #[doc = "Illuminator"]
2166    MAV_COMP_ID_ILLUMINATOR = 243,
2167    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2168    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2169    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2170}
2171impl MavComponent {
2172    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2173}
2174impl Default for MavComponent {
2175    fn default() -> Self {
2176        Self::DEFAULT
2177    }
2178}
2179#[cfg_attr(feature = "ts", derive(TS))]
2180#[cfg_attr(feature = "ts", ts(export))]
2181#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2183#[cfg_attr(feature = "serde", serde(tag = "type"))]
2184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2185#[repr(u32)]
2186#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2187#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2188pub enum MavDataStream {
2189    #[doc = "Enable all data streams"]
2190    MAV_DATA_STREAM_ALL = 0,
2191    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2192    MAV_DATA_STREAM_RAW_SENSORS = 1,
2193    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2194    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2195    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2196    MAV_DATA_STREAM_RC_CHANNELS = 3,
2197    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2198    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2199    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2200    MAV_DATA_STREAM_POSITION = 6,
2201    #[doc = "Dependent on the autopilot"]
2202    MAV_DATA_STREAM_EXTRA1 = 10,
2203    #[doc = "Dependent on the autopilot"]
2204    MAV_DATA_STREAM_EXTRA2 = 11,
2205    #[doc = "Dependent on the autopilot"]
2206    MAV_DATA_STREAM_EXTRA3 = 12,
2207}
2208impl MavDataStream {
2209    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2210}
2211impl Default for MavDataStream {
2212    fn default() -> Self {
2213        Self::DEFAULT
2214    }
2215}
2216#[cfg_attr(feature = "ts", derive(TS))]
2217#[cfg_attr(feature = "ts", ts(export))]
2218#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2219#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2220#[cfg_attr(feature = "serde", serde(tag = "type"))]
2221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2222#[repr(u32)]
2223#[doc = "Enumeration of distance sensor types"]
2224pub enum MavDistanceSensor {
2225    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2226    MAV_DISTANCE_SENSOR_LASER = 0,
2227    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2228    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2229    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2230    MAV_DISTANCE_SENSOR_INFRARED = 2,
2231    #[doc = "Radar type, e.g. uLanding units"]
2232    MAV_DISTANCE_SENSOR_RADAR = 3,
2233    #[doc = "Broken or unknown type, e.g. analog units"]
2234    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2235}
2236impl MavDistanceSensor {
2237    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2238}
2239impl Default for MavDistanceSensor {
2240    fn default() -> Self {
2241        Self::DEFAULT
2242    }
2243}
2244#[cfg_attr(feature = "ts", derive(TS))]
2245#[cfg_attr(feature = "ts", ts(export))]
2246#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2247#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2248#[cfg_attr(feature = "serde", serde(tag = "type"))]
2249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2250#[repr(u32)]
2251#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2252pub enum MavDoRepositionFlags {
2253    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2254    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2255}
2256impl MavDoRepositionFlags {
2257    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2258}
2259impl Default for MavDoRepositionFlags {
2260    fn default() -> Self {
2261        Self::DEFAULT
2262    }
2263}
2264#[cfg_attr(feature = "ts", derive(TS))]
2265#[cfg_attr(feature = "ts", ts(export))]
2266#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2268#[cfg_attr(feature = "serde", serde(tag = "type"))]
2269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2270#[repr(u32)]
2271#[doc = "Enumeration of estimator types"]
2272pub enum MavEstimatorType {
2273    #[doc = "Unknown type of the estimator."]
2274    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2275    #[doc = "This is a naive estimator without any real covariance feedback."]
2276    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2277    #[doc = "Computer vision based estimate. Might be up to scale."]
2278    MAV_ESTIMATOR_TYPE_VISION = 2,
2279    #[doc = "Visual-inertial estimate."]
2280    MAV_ESTIMATOR_TYPE_VIO = 3,
2281    #[doc = "Plain GPS estimate."]
2282    MAV_ESTIMATOR_TYPE_GPS = 4,
2283    #[doc = "Estimator integrating GPS and inertial sensing."]
2284    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2285    #[doc = "Estimate from external motion capturing system."]
2286    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2287    #[doc = "Estimator based on lidar sensor input."]
2288    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2289    #[doc = "Estimator on autopilot."]
2290    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2291}
2292impl MavEstimatorType {
2293    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2294}
2295impl Default for MavEstimatorType {
2296    fn default() -> Self {
2297        Self::DEFAULT
2298    }
2299}
2300#[cfg_attr(feature = "ts", derive(TS))]
2301#[cfg_attr(feature = "ts", ts(export))]
2302#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2303#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2304#[cfg_attr(feature = "serde", serde(tag = "type"))]
2305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2306#[repr(u32)]
2307#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2308pub enum MavEventCurrentSequenceFlags {
2309    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2310    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2311}
2312impl MavEventCurrentSequenceFlags {
2313    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2314}
2315impl Default for MavEventCurrentSequenceFlags {
2316    fn default() -> Self {
2317        Self::DEFAULT
2318    }
2319}
2320#[cfg_attr(feature = "ts", derive(TS))]
2321#[cfg_attr(feature = "ts", ts(export))]
2322#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2323#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2324#[cfg_attr(feature = "serde", serde(tag = "type"))]
2325#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2326#[repr(u32)]
2327#[doc = "Reason for an event error response."]
2328pub enum MavEventErrorReason {
2329    #[doc = "The requested event is not available (anymore)."]
2330    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2331}
2332impl MavEventErrorReason {
2333    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2334}
2335impl Default for MavEventErrorReason {
2336    fn default() -> Self {
2337        Self::DEFAULT
2338    }
2339}
2340#[cfg_attr(feature = "ts", derive(TS))]
2341#[cfg_attr(feature = "ts", ts(export))]
2342#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2344#[cfg_attr(feature = "serde", serde(tag = "type"))]
2345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2346#[repr(u32)]
2347#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2348pub enum MavFrame {
2349    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2350    MAV_FRAME_GLOBAL = 0,
2351    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2352    MAV_FRAME_LOCAL_NED = 1,
2353    #[doc = "NOT a coordinate frame, indicates a mission command."]
2354    MAV_FRAME_MISSION = 2,
2355    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2356    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2357    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2358    MAV_FRAME_LOCAL_ENU = 4,
2359    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2360    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2361    MAV_FRAME_GLOBAL_INT = 5,
2362    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2363    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2364    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2365    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2366    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2367    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2368    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2369    MAV_FRAME_BODY_NED = 8,
2370    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2371    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2372    MAV_FRAME_BODY_OFFSET_NED = 9,
2373    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2374    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2375    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2376    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2377    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2378    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2379    MAV_FRAME_BODY_FRD = 12,
2380    #[deprecated = "  (Deprecated since 2019-04)"]
2381    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2382    MAV_FRAME_RESERVED_13 = 13,
2383    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2384    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2385    MAV_FRAME_RESERVED_14 = 14,
2386    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2387    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2388    MAV_FRAME_RESERVED_15 = 15,
2389    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2390    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2391    MAV_FRAME_RESERVED_16 = 16,
2392    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2393    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2394    MAV_FRAME_RESERVED_17 = 17,
2395    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2396    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2397    MAV_FRAME_RESERVED_18 = 18,
2398    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2399    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2400    MAV_FRAME_RESERVED_19 = 19,
2401    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2402    MAV_FRAME_LOCAL_FRD = 20,
2403    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2404    MAV_FRAME_LOCAL_FLU = 21,
2405}
2406impl MavFrame {
2407    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2408}
2409impl Default for MavFrame {
2410    fn default() -> Self {
2411        Self::DEFAULT
2412    }
2413}
2414#[cfg_attr(feature = "ts", derive(TS))]
2415#[cfg_attr(feature = "ts", ts(export))]
2416#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2417#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2418#[cfg_attr(feature = "serde", serde(tag = "type"))]
2419#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2420#[repr(u32)]
2421#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2422pub enum MavFtpErr {
2423    #[doc = "None: No error"]
2424    MAV_FTP_ERR_NONE = 0,
2425    #[doc = "Fail: Unknown failure"]
2426    MAV_FTP_ERR_FAIL = 1,
2427    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2428    MAV_FTP_ERR_FAILERRNO = 2,
2429    #[doc = "InvalidDataSize: Payload size is invalid"]
2430    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2431    #[doc = "InvalidSession: Session is not currently open"]
2432    MAV_FTP_ERR_INVALIDSESSION = 4,
2433    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2434    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2435    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2436    MAV_FTP_ERR_EOF = 6,
2437    #[doc = "UnknownCommand: Unknown command / opcode"]
2438    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2439    #[doc = "FileExists: File/directory already exists"]
2440    MAV_FTP_ERR_FILEEXISTS = 8,
2441    #[doc = "FileProtected: File/directory is write protected"]
2442    MAV_FTP_ERR_FILEPROTECTED = 9,
2443    #[doc = "FileNotFound: File/directory not found"]
2444    MAV_FTP_ERR_FILENOTFOUND = 10,
2445}
2446impl MavFtpErr {
2447    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2448}
2449impl Default for MavFtpErr {
2450    fn default() -> Self {
2451        Self::DEFAULT
2452    }
2453}
2454#[cfg_attr(feature = "ts", derive(TS))]
2455#[cfg_attr(feature = "ts", ts(export))]
2456#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2457#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2458#[cfg_attr(feature = "serde", serde(tag = "type"))]
2459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2460#[repr(u32)]
2461#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2462pub enum MavFtpOpcode {
2463    #[doc = "None. Ignored, always ACKed"]
2464    MAV_FTP_OPCODE_NONE = 0,
2465    #[doc = "TerminateSession: Terminates open Read session"]
2466    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2467    #[doc = "ResetSessions: Terminates all open read sessions"]
2468    MAV_FTP_OPCODE_RESETSESSION = 2,
2469    #[doc = "ListDirectory. List files and directories in path from offset"]
2470    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2471    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2472    MAV_FTP_OPCODE_OPENFILERO = 4,
2473    #[doc = "ReadFile: Reads size bytes from offset in session"]
2474    MAV_FTP_OPCODE_READFILE = 5,
2475    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2476    MAV_FTP_OPCODE_CREATEFILE = 6,
2477    #[doc = "WriteFile: Writes size bytes to offset in session"]
2478    MAV_FTP_OPCODE_WRITEFILE = 7,
2479    #[doc = "RemoveFile: Remove file at path"]
2480    MAV_FTP_OPCODE_REMOVEFILE = 8,
2481    #[doc = "CreateDirectory: Creates directory at path"]
2482    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2483    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2484    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2485    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2486    MAV_FTP_OPCODE_OPENFILEWO = 11,
2487    #[doc = "TruncateFile: Truncate file at path to offset length"]
2488    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2489    #[doc = "Rename: Rename path1 to path2"]
2490    MAV_FTP_OPCODE_RENAME = 13,
2491    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2492    MAV_FTP_OPCODE_CALCFILECRC = 14,
2493    #[doc = "BurstReadFile: Burst download session file"]
2494    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2495    #[doc = "ACK: ACK response"]
2496    MAV_FTP_OPCODE_ACK = 128,
2497    #[doc = "NAK: NAK response"]
2498    MAV_FTP_OPCODE_NAK = 129,
2499}
2500impl MavFtpOpcode {
2501    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2502}
2503impl Default for MavFtpOpcode {
2504    fn default() -> Self {
2505        Self::DEFAULT
2506    }
2507}
2508#[cfg_attr(feature = "ts", derive(TS))]
2509#[cfg_attr(feature = "ts", ts(export))]
2510#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2511#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2512#[cfg_attr(feature = "serde", serde(tag = "type"))]
2513#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2514#[repr(u32)]
2515#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2516pub enum MavFuelType {
2517    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2518    MAV_FUEL_TYPE_UNKNOWN = 0,
2519    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2520    MAV_FUEL_TYPE_LIQUID = 1,
2521    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2522    MAV_FUEL_TYPE_GAS = 2,
2523}
2524impl MavFuelType {
2525    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2526}
2527impl Default for MavFuelType {
2528    fn default() -> Self {
2529        Self::DEFAULT
2530    }
2531}
2532bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2533impl MavGeneratorStatusFlag {
2534    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2535}
2536impl Default for MavGeneratorStatusFlag {
2537    fn default() -> Self {
2538        Self::DEFAULT
2539    }
2540}
2541#[cfg_attr(feature = "ts", derive(TS))]
2542#[cfg_attr(feature = "ts", ts(export))]
2543#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2544#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2545#[cfg_attr(feature = "serde", serde(tag = "type"))]
2546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2547#[repr(u32)]
2548#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2549pub enum MavGoto {
2550    #[doc = "Hold at the current position."]
2551    MAV_GOTO_DO_HOLD = 0,
2552    #[doc = "Continue with the next item in mission execution."]
2553    MAV_GOTO_DO_CONTINUE = 1,
2554    #[doc = "Hold at the current position of the system"]
2555    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2556    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2557    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2558}
2559impl MavGoto {
2560    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2561}
2562impl Default for MavGoto {
2563    fn default() -> Self {
2564        Self::DEFAULT
2565    }
2566}
2567#[cfg_attr(feature = "ts", derive(TS))]
2568#[cfg_attr(feature = "ts", ts(export))]
2569#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2570#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2571#[cfg_attr(feature = "serde", serde(tag = "type"))]
2572#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2573#[repr(u32)]
2574#[doc = "Enumeration of landed detector states"]
2575pub enum MavLandedState {
2576    #[doc = "MAV landed state is unknown"]
2577    MAV_LANDED_STATE_UNDEFINED = 0,
2578    #[doc = "MAV is landed (on ground)"]
2579    MAV_LANDED_STATE_ON_GROUND = 1,
2580    #[doc = "MAV is in air"]
2581    MAV_LANDED_STATE_IN_AIR = 2,
2582    #[doc = "MAV currently taking off"]
2583    MAV_LANDED_STATE_TAKEOFF = 3,
2584    #[doc = "MAV currently landing"]
2585    MAV_LANDED_STATE_LANDING = 4,
2586}
2587impl MavLandedState {
2588    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2589}
2590impl Default for MavLandedState {
2591    fn default() -> Self {
2592        Self::DEFAULT
2593    }
2594}
2595#[cfg_attr(feature = "ts", derive(TS))]
2596#[cfg_attr(feature = "ts", ts(export))]
2597#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2599#[cfg_attr(feature = "serde", serde(tag = "type"))]
2600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2601#[repr(u32)]
2602#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2603pub enum MavMissionResult {
2604    #[doc = "mission accepted OK"]
2605    MAV_MISSION_ACCEPTED = 0,
2606    #[doc = "Generic error / not accepting mission commands at all right now."]
2607    MAV_MISSION_ERROR = 1,
2608    #[doc = "Coordinate frame is not supported."]
2609    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2610    #[doc = "Command is not supported."]
2611    MAV_MISSION_UNSUPPORTED = 3,
2612    #[doc = "Mission items exceed storage space."]
2613    MAV_MISSION_NO_SPACE = 4,
2614    #[doc = "One of the parameters has an invalid value."]
2615    MAV_MISSION_INVALID = 5,
2616    #[doc = "param1 has an invalid value."]
2617    MAV_MISSION_INVALID_PARAM1 = 6,
2618    #[doc = "param2 has an invalid value."]
2619    MAV_MISSION_INVALID_PARAM2 = 7,
2620    #[doc = "param3 has an invalid value."]
2621    MAV_MISSION_INVALID_PARAM3 = 8,
2622    #[doc = "param4 has an invalid value."]
2623    MAV_MISSION_INVALID_PARAM4 = 9,
2624    #[doc = "x / param5 has an invalid value."]
2625    MAV_MISSION_INVALID_PARAM5_X = 10,
2626    #[doc = "y / param6 has an invalid value."]
2627    MAV_MISSION_INVALID_PARAM6_Y = 11,
2628    #[doc = "z / param7 has an invalid value."]
2629    MAV_MISSION_INVALID_PARAM7 = 12,
2630    #[doc = "Mission item received out of sequence"]
2631    MAV_MISSION_INVALID_SEQUENCE = 13,
2632    #[doc = "Not accepting any mission commands from this communication partner."]
2633    MAV_MISSION_DENIED = 14,
2634    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2635    MAV_MISSION_OPERATION_CANCELLED = 15,
2636}
2637impl MavMissionResult {
2638    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2639}
2640impl Default for MavMissionResult {
2641    fn default() -> Self {
2642        Self::DEFAULT
2643    }
2644}
2645#[cfg_attr(feature = "ts", derive(TS))]
2646#[cfg_attr(feature = "ts", ts(export))]
2647#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2648#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2649#[cfg_attr(feature = "serde", serde(tag = "type"))]
2650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2651#[repr(u32)]
2652#[doc = "Type of mission items being requested/sent in mission protocol."]
2653pub enum MavMissionType {
2654    #[doc = "Items are mission commands for main mission."]
2655    MAV_MISSION_TYPE_MISSION = 0,
2656    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2657    MAV_MISSION_TYPE_FENCE = 1,
2658    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2659    MAV_MISSION_TYPE_RALLY = 2,
2660    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2661    MAV_MISSION_TYPE_ALL = 255,
2662}
2663impl MavMissionType {
2664    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2665}
2666impl Default for MavMissionType {
2667    fn default() -> Self {
2668        Self::DEFAULT
2669    }
2670}
2671#[cfg_attr(feature = "ts", derive(TS))]
2672#[cfg_attr(feature = "ts", ts(export))]
2673#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2675#[cfg_attr(feature = "serde", serde(tag = "type"))]
2676#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2677#[repr(u32)]
2678#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2679pub enum MavMode {
2680    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2681    MAV_MODE_PREFLIGHT = 0,
2682    #[doc = "System is allowed to be active, under assisted RC control."]
2683    MAV_MODE_STABILIZE_DISARMED = 80,
2684    #[doc = "System is allowed to be active, under assisted RC control."]
2685    MAV_MODE_STABILIZE_ARMED = 208,
2686    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2687    MAV_MODE_MANUAL_DISARMED = 64,
2688    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2689    MAV_MODE_MANUAL_ARMED = 192,
2690    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2691    MAV_MODE_GUIDED_DISARMED = 88,
2692    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2693    MAV_MODE_GUIDED_ARMED = 216,
2694    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2695    MAV_MODE_AUTO_DISARMED = 92,
2696    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2697    MAV_MODE_AUTO_ARMED = 220,
2698    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2699    MAV_MODE_TEST_DISARMED = 66,
2700    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2701    MAV_MODE_TEST_ARMED = 194,
2702}
2703impl MavMode {
2704    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2705}
2706impl Default for MavMode {
2707    fn default() -> Self {
2708        Self::DEFAULT
2709    }
2710}
2711bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2712impl MavModeFlag {
2713    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2714}
2715impl Default for MavModeFlag {
2716    fn default() -> Self {
2717        Self::DEFAULT
2718    }
2719}
2720#[cfg_attr(feature = "ts", derive(TS))]
2721#[cfg_attr(feature = "ts", ts(export))]
2722#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2723#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2724#[cfg_attr(feature = "serde", serde(tag = "type"))]
2725#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2726#[repr(u32)]
2727#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2728pub enum MavModeFlagDecodePosition {
2729    #[doc = "First bit:  10000000"]
2730    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2731    #[doc = "Second bit: 01000000"]
2732    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2733    #[doc = "Third bit:  00100000"]
2734    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2735    #[doc = "Fourth bit: 00010000"]
2736    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2737    #[doc = "Fifth bit:  00001000"]
2738    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2739    #[doc = "Sixth bit:   00000100"]
2740    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2741    #[doc = "Seventh bit: 00000010"]
2742    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2743    #[doc = "Eighth bit: 00000001"]
2744    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2745}
2746impl MavModeFlagDecodePosition {
2747    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2748}
2749impl Default for MavModeFlagDecodePosition {
2750    fn default() -> Self {
2751        Self::DEFAULT
2752    }
2753}
2754bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2755impl MavModeProperty {
2756    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2757}
2758impl Default for MavModeProperty {
2759    fn default() -> Self {
2760        Self::DEFAULT
2761    }
2762}
2763#[cfg_attr(feature = "ts", derive(TS))]
2764#[cfg_attr(feature = "ts", ts(export))]
2765#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2767#[cfg_attr(feature = "serde", serde(tag = "type"))]
2768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2769#[repr(u32)]
2770#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2771#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2772pub enum MavMountMode {
2773    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2774    MAV_MOUNT_MODE_RETRACT = 0,
2775    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2776    MAV_MOUNT_MODE_NEUTRAL = 1,
2777    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2778    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2779    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2780    MAV_MOUNT_MODE_RC_TARGETING = 3,
2781    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2782    MAV_MOUNT_MODE_GPS_POINT = 4,
2783    #[doc = "Gimbal tracks system with specified system ID"]
2784    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2785    #[doc = "Gimbal tracks home position"]
2786    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2787}
2788impl MavMountMode {
2789    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2790}
2791impl Default for MavMountMode {
2792    fn default() -> Self {
2793        Self::DEFAULT
2794    }
2795}
2796#[cfg_attr(feature = "ts", derive(TS))]
2797#[cfg_attr(feature = "ts", ts(export))]
2798#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2800#[cfg_attr(feature = "serde", serde(tag = "type"))]
2801#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2802#[repr(u32)]
2803pub enum MavOdidArmStatus {
2804    #[doc = "Passing arming checks."]
2805    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2806    #[doc = "Generic arming failure, see error string for details."]
2807    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2808}
2809impl MavOdidArmStatus {
2810    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2811}
2812impl Default for MavOdidArmStatus {
2813    fn default() -> Self {
2814        Self::DEFAULT
2815    }
2816}
2817#[cfg_attr(feature = "ts", derive(TS))]
2818#[cfg_attr(feature = "ts", ts(export))]
2819#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2820#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2821#[cfg_attr(feature = "serde", serde(tag = "type"))]
2822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2823#[repr(u32)]
2824pub enum MavOdidAuthType {
2825    #[doc = "No authentication type is specified."]
2826    MAV_ODID_AUTH_TYPE_NONE = 0,
2827    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2828    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2829    #[doc = "Signature for the Operator ID."]
2830    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2831    #[doc = "Signature for the entire message set."]
2832    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2833    #[doc = "Authentication is provided by Network Remote ID."]
2834    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2835    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2836    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2837}
2838impl MavOdidAuthType {
2839    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2840}
2841impl Default for MavOdidAuthType {
2842    fn default() -> Self {
2843        Self::DEFAULT
2844    }
2845}
2846#[cfg_attr(feature = "ts", derive(TS))]
2847#[cfg_attr(feature = "ts", ts(export))]
2848#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2849#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2850#[cfg_attr(feature = "serde", serde(tag = "type"))]
2851#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2852#[repr(u32)]
2853pub enum MavOdidCategoryEu {
2854    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2855    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2856    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2857    MAV_ODID_CATEGORY_EU_OPEN = 1,
2858    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2859    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2860    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2861    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2862}
2863impl MavOdidCategoryEu {
2864    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2865}
2866impl Default for MavOdidCategoryEu {
2867    fn default() -> Self {
2868        Self::DEFAULT
2869    }
2870}
2871#[cfg_attr(feature = "ts", derive(TS))]
2872#[cfg_attr(feature = "ts", ts(export))]
2873#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2875#[cfg_attr(feature = "serde", serde(tag = "type"))]
2876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2877#[repr(u32)]
2878pub enum MavOdidClassEu {
2879    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2880    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2881    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2882    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2883    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2884    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2885    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2886    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2887    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2888    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2889    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2890    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2891    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2892    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2893    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2894    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2895}
2896impl MavOdidClassEu {
2897    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2898}
2899impl Default for MavOdidClassEu {
2900    fn default() -> Self {
2901        Self::DEFAULT
2902    }
2903}
2904#[cfg_attr(feature = "ts", derive(TS))]
2905#[cfg_attr(feature = "ts", ts(export))]
2906#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2907#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2908#[cfg_attr(feature = "serde", serde(tag = "type"))]
2909#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2910#[repr(u32)]
2911pub enum MavOdidClassificationType {
2912    #[doc = "The classification type for the UA is undeclared."]
2913    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2914    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2915    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2916}
2917impl MavOdidClassificationType {
2918    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2919}
2920impl Default for MavOdidClassificationType {
2921    fn default() -> Self {
2922        Self::DEFAULT
2923    }
2924}
2925#[cfg_attr(feature = "ts", derive(TS))]
2926#[cfg_attr(feature = "ts", ts(export))]
2927#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2928#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2929#[cfg_attr(feature = "serde", serde(tag = "type"))]
2930#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2931#[repr(u32)]
2932pub enum MavOdidDescType {
2933    #[doc = "Optional free-form text description of the purpose of the flight."]
2934    MAV_ODID_DESC_TYPE_TEXT = 0,
2935    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2936    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2937    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2938    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2939}
2940impl MavOdidDescType {
2941    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2942}
2943impl Default for MavOdidDescType {
2944    fn default() -> Self {
2945        Self::DEFAULT
2946    }
2947}
2948#[cfg_attr(feature = "ts", derive(TS))]
2949#[cfg_attr(feature = "ts", ts(export))]
2950#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2952#[cfg_attr(feature = "serde", serde(tag = "type"))]
2953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2954#[repr(u32)]
2955pub enum MavOdidHeightRef {
2956    #[doc = "The height field is relative to the take-off location."]
2957    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2958    #[doc = "The height field is relative to ground."]
2959    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2960}
2961impl MavOdidHeightRef {
2962    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2963}
2964impl Default for MavOdidHeightRef {
2965    fn default() -> Self {
2966        Self::DEFAULT
2967    }
2968}
2969#[cfg_attr(feature = "ts", derive(TS))]
2970#[cfg_attr(feature = "ts", ts(export))]
2971#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2973#[cfg_attr(feature = "serde", serde(tag = "type"))]
2974#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2975#[repr(u32)]
2976pub enum MavOdidHorAcc {
2977    #[doc = "The horizontal accuracy is unknown."]
2978    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2979    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2980    MAV_ODID_HOR_ACC_10NM = 1,
2981    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2982    MAV_ODID_HOR_ACC_4NM = 2,
2983    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2984    MAV_ODID_HOR_ACC_2NM = 3,
2985    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2986    MAV_ODID_HOR_ACC_1NM = 4,
2987    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2988    MAV_ODID_HOR_ACC_0_5NM = 5,
2989    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2990    MAV_ODID_HOR_ACC_0_3NM = 6,
2991    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2992    MAV_ODID_HOR_ACC_0_1NM = 7,
2993    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2994    MAV_ODID_HOR_ACC_0_05NM = 8,
2995    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2996    MAV_ODID_HOR_ACC_30_METER = 9,
2997    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2998    MAV_ODID_HOR_ACC_10_METER = 10,
2999    #[doc = "The horizontal accuracy is smaller than 3 meter."]
3000    MAV_ODID_HOR_ACC_3_METER = 11,
3001    #[doc = "The horizontal accuracy is smaller than 1 meter."]
3002    MAV_ODID_HOR_ACC_1_METER = 12,
3003}
3004impl MavOdidHorAcc {
3005    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
3006}
3007impl Default for MavOdidHorAcc {
3008    fn default() -> Self {
3009        Self::DEFAULT
3010    }
3011}
3012#[cfg_attr(feature = "ts", derive(TS))]
3013#[cfg_attr(feature = "ts", ts(export))]
3014#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3015#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3016#[cfg_attr(feature = "serde", serde(tag = "type"))]
3017#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3018#[repr(u32)]
3019pub enum MavOdidIdType {
3020    #[doc = "No type defined."]
3021    MAV_ODID_ID_TYPE_NONE = 0,
3022    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
3023    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
3024    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
3025    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
3026    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
3027    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
3028    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
3029    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
3030}
3031impl MavOdidIdType {
3032    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
3033}
3034impl Default for MavOdidIdType {
3035    fn default() -> Self {
3036        Self::DEFAULT
3037    }
3038}
3039#[cfg_attr(feature = "ts", derive(TS))]
3040#[cfg_attr(feature = "ts", ts(export))]
3041#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3042#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3043#[cfg_attr(feature = "serde", serde(tag = "type"))]
3044#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3045#[repr(u32)]
3046pub enum MavOdidOperatorIdType {
3047    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
3048    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
3049}
3050impl MavOdidOperatorIdType {
3051    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
3052}
3053impl Default for MavOdidOperatorIdType {
3054    fn default() -> Self {
3055        Self::DEFAULT
3056    }
3057}
3058#[cfg_attr(feature = "ts", derive(TS))]
3059#[cfg_attr(feature = "ts", ts(export))]
3060#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3062#[cfg_attr(feature = "serde", serde(tag = "type"))]
3063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3064#[repr(u32)]
3065pub enum MavOdidOperatorLocationType {
3066    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3067    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3068    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3069    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3070    #[doc = "The location/altitude of the operator are fixed values."]
3071    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3072}
3073impl MavOdidOperatorLocationType {
3074    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3075}
3076impl Default for MavOdidOperatorLocationType {
3077    fn default() -> Self {
3078        Self::DEFAULT
3079    }
3080}
3081#[cfg_attr(feature = "ts", derive(TS))]
3082#[cfg_attr(feature = "ts", ts(export))]
3083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3085#[cfg_attr(feature = "serde", serde(tag = "type"))]
3086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3087#[repr(u32)]
3088pub enum MavOdidSpeedAcc {
3089    #[doc = "The speed accuracy is unknown."]
3090    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3091    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3092    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3093    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3094    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3095    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3096    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3097    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3098    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3099}
3100impl MavOdidSpeedAcc {
3101    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3102}
3103impl Default for MavOdidSpeedAcc {
3104    fn default() -> Self {
3105        Self::DEFAULT
3106    }
3107}
3108#[cfg_attr(feature = "ts", derive(TS))]
3109#[cfg_attr(feature = "ts", ts(export))]
3110#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3111#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3112#[cfg_attr(feature = "serde", serde(tag = "type"))]
3113#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3114#[repr(u32)]
3115pub enum MavOdidStatus {
3116    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3117    MAV_ODID_STATUS_UNDECLARED = 0,
3118    #[doc = "The UA is on the ground."]
3119    MAV_ODID_STATUS_GROUND = 1,
3120    #[doc = "The UA is in the air."]
3121    MAV_ODID_STATUS_AIRBORNE = 2,
3122    #[doc = "The UA is having an emergency."]
3123    MAV_ODID_STATUS_EMERGENCY = 3,
3124    #[doc = "The remote ID system is failing or unreliable in some way."]
3125    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3126}
3127impl MavOdidStatus {
3128    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3129}
3130impl Default for MavOdidStatus {
3131    fn default() -> Self {
3132        Self::DEFAULT
3133    }
3134}
3135#[cfg_attr(feature = "ts", derive(TS))]
3136#[cfg_attr(feature = "ts", ts(export))]
3137#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3139#[cfg_attr(feature = "serde", serde(tag = "type"))]
3140#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3141#[repr(u32)]
3142pub enum MavOdidTimeAcc {
3143    #[doc = "The timestamp accuracy is unknown."]
3144    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3145    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3146    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3147    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3148    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3149    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3150    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3151    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3152    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3153    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3154    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3155    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3156    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3157    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3158    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3159    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3160    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3161    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3162    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3163    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3164    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3165    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3166    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3167    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3168    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3169    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3170    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3171    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3172    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3173    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3174    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3175}
3176impl MavOdidTimeAcc {
3177    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3178}
3179impl Default for MavOdidTimeAcc {
3180    fn default() -> Self {
3181        Self::DEFAULT
3182    }
3183}
3184#[cfg_attr(feature = "ts", derive(TS))]
3185#[cfg_attr(feature = "ts", ts(export))]
3186#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3187#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3188#[cfg_attr(feature = "serde", serde(tag = "type"))]
3189#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3190#[repr(u32)]
3191pub enum MavOdidUaType {
3192    #[doc = "No UA (Unmanned Aircraft) type defined."]
3193    MAV_ODID_UA_TYPE_NONE = 0,
3194    #[doc = "Aeroplane/Airplane. Fixed wing."]
3195    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3196    #[doc = "Helicopter or multirotor."]
3197    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3198    #[doc = "Gyroplane."]
3199    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3200    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3201    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3202    #[doc = "Ornithopter."]
3203    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3204    #[doc = "Glider."]
3205    MAV_ODID_UA_TYPE_GLIDER = 6,
3206    #[doc = "Kite."]
3207    MAV_ODID_UA_TYPE_KITE = 7,
3208    #[doc = "Free Balloon."]
3209    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3210    #[doc = "Captive Balloon."]
3211    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3212    #[doc = "Airship. E.g. a blimp."]
3213    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3214    #[doc = "Free Fall/Parachute (unpowered)."]
3215    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3216    #[doc = "Rocket."]
3217    MAV_ODID_UA_TYPE_ROCKET = 12,
3218    #[doc = "Tethered powered aircraft."]
3219    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3220    #[doc = "Ground Obstacle."]
3221    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3222    #[doc = "Other type of aircraft not listed earlier."]
3223    MAV_ODID_UA_TYPE_OTHER = 15,
3224}
3225impl MavOdidUaType {
3226    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3227}
3228impl Default for MavOdidUaType {
3229    fn default() -> Self {
3230        Self::DEFAULT
3231    }
3232}
3233#[cfg_attr(feature = "ts", derive(TS))]
3234#[cfg_attr(feature = "ts", ts(export))]
3235#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3236#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3237#[cfg_attr(feature = "serde", serde(tag = "type"))]
3238#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3239#[repr(u32)]
3240pub enum MavOdidVerAcc {
3241    #[doc = "The vertical accuracy is unknown."]
3242    MAV_ODID_VER_ACC_UNKNOWN = 0,
3243    #[doc = "The vertical accuracy is smaller than 150 meter."]
3244    MAV_ODID_VER_ACC_150_METER = 1,
3245    #[doc = "The vertical accuracy is smaller than 45 meter."]
3246    MAV_ODID_VER_ACC_45_METER = 2,
3247    #[doc = "The vertical accuracy is smaller than 25 meter."]
3248    MAV_ODID_VER_ACC_25_METER = 3,
3249    #[doc = "The vertical accuracy is smaller than 10 meter."]
3250    MAV_ODID_VER_ACC_10_METER = 4,
3251    #[doc = "The vertical accuracy is smaller than 3 meter."]
3252    MAV_ODID_VER_ACC_3_METER = 5,
3253    #[doc = "The vertical accuracy is smaller than 1 meter."]
3254    MAV_ODID_VER_ACC_1_METER = 6,
3255}
3256impl MavOdidVerAcc {
3257    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3258}
3259impl Default for MavOdidVerAcc {
3260    fn default() -> Self {
3261        Self::DEFAULT
3262    }
3263}
3264#[cfg_attr(feature = "ts", derive(TS))]
3265#[cfg_attr(feature = "ts", ts(export))]
3266#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3268#[cfg_attr(feature = "serde", serde(tag = "type"))]
3269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3270#[repr(u32)]
3271#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3272pub enum MavParamExtType {
3273    #[doc = "8-bit unsigned integer"]
3274    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3275    #[doc = "8-bit signed integer"]
3276    MAV_PARAM_EXT_TYPE_INT8 = 2,
3277    #[doc = "16-bit unsigned integer"]
3278    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3279    #[doc = "16-bit signed integer"]
3280    MAV_PARAM_EXT_TYPE_INT16 = 4,
3281    #[doc = "32-bit unsigned integer"]
3282    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3283    #[doc = "32-bit signed integer"]
3284    MAV_PARAM_EXT_TYPE_INT32 = 6,
3285    #[doc = "64-bit unsigned integer"]
3286    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3287    #[doc = "64-bit signed integer"]
3288    MAV_PARAM_EXT_TYPE_INT64 = 8,
3289    #[doc = "32-bit floating-point"]
3290    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3291    #[doc = "64-bit floating-point"]
3292    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3293    #[doc = "Custom Type"]
3294    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3295}
3296impl MavParamExtType {
3297    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3298}
3299impl Default for MavParamExtType {
3300    fn default() -> Self {
3301        Self::DEFAULT
3302    }
3303}
3304#[cfg_attr(feature = "ts", derive(TS))]
3305#[cfg_attr(feature = "ts", ts(export))]
3306#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3307#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3308#[cfg_attr(feature = "serde", serde(tag = "type"))]
3309#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3310#[repr(u32)]
3311#[doc = "Specifies the datatype of a MAVLink parameter."]
3312pub enum MavParamType {
3313    #[doc = "8-bit unsigned integer"]
3314    MAV_PARAM_TYPE_UINT8 = 1,
3315    #[doc = "8-bit signed integer"]
3316    MAV_PARAM_TYPE_INT8 = 2,
3317    #[doc = "16-bit unsigned integer"]
3318    MAV_PARAM_TYPE_UINT16 = 3,
3319    #[doc = "16-bit signed integer"]
3320    MAV_PARAM_TYPE_INT16 = 4,
3321    #[doc = "32-bit unsigned integer"]
3322    MAV_PARAM_TYPE_UINT32 = 5,
3323    #[doc = "32-bit signed integer"]
3324    MAV_PARAM_TYPE_INT32 = 6,
3325    #[doc = "64-bit unsigned integer"]
3326    MAV_PARAM_TYPE_UINT64 = 7,
3327    #[doc = "64-bit signed integer"]
3328    MAV_PARAM_TYPE_INT64 = 8,
3329    #[doc = "32-bit floating-point"]
3330    MAV_PARAM_TYPE_REAL32 = 9,
3331    #[doc = "64-bit floating-point"]
3332    MAV_PARAM_TYPE_REAL64 = 10,
3333}
3334impl MavParamType {
3335    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3336}
3337impl Default for MavParamType {
3338    fn default() -> Self {
3339        Self::DEFAULT
3340    }
3341}
3342bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3343impl MavPowerStatus {
3344    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3345}
3346impl Default for MavPowerStatus {
3347    fn default() -> Self {
3348        Self::DEFAULT
3349    }
3350}
3351bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3352impl MavProtocolCapability {
3353    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3354}
3355impl Default for MavProtocolCapability {
3356    fn default() -> Self {
3357        Self::DEFAULT
3358    }
3359}
3360#[cfg_attr(feature = "ts", derive(TS))]
3361#[cfg_attr(feature = "ts", ts(export))]
3362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3364#[cfg_attr(feature = "serde", serde(tag = "type"))]
3365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3366#[repr(u32)]
3367#[doc = "Result from a MAVLink command (MAV_CMD)"]
3368pub enum MavResult {
3369    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3370    MAV_RESULT_ACCEPTED = 0,
3371    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3372    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3373    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3374    MAV_RESULT_DENIED = 2,
3375    #[doc = "Command is not supported (unknown)."]
3376    MAV_RESULT_UNSUPPORTED = 3,
3377    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3378    MAV_RESULT_FAILED = 4,
3379    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3380    MAV_RESULT_IN_PROGRESS = 5,
3381    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3382    MAV_RESULT_CANCELLED = 6,
3383    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3384    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3385    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3386    MAV_RESULT_COMMAND_INT_ONLY = 8,
3387    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3388    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3389}
3390impl MavResult {
3391    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3392}
3393impl Default for MavResult {
3394    fn default() -> Self {
3395        Self::DEFAULT
3396    }
3397}
3398#[cfg_attr(feature = "ts", derive(TS))]
3399#[cfg_attr(feature = "ts", ts(export))]
3400#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3401#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3402#[cfg_attr(feature = "serde", serde(tag = "type"))]
3403#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3404#[repr(u32)]
3405#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3406#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3407pub enum MavRoi {
3408    #[doc = "No region of interest."]
3409    MAV_ROI_NONE = 0,
3410    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3411    MAV_ROI_WPNEXT = 1,
3412    #[doc = "Point toward given waypoint."]
3413    MAV_ROI_WPINDEX = 2,
3414    #[doc = "Point toward fixed location."]
3415    MAV_ROI_LOCATION = 3,
3416    #[doc = "Point toward of given id."]
3417    MAV_ROI_TARGET = 4,
3418}
3419impl MavRoi {
3420    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3421}
3422impl Default for MavRoi {
3423    fn default() -> Self {
3424        Self::DEFAULT
3425    }
3426}
3427#[cfg_attr(feature = "ts", derive(TS))]
3428#[cfg_attr(feature = "ts", ts(export))]
3429#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3430#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3431#[cfg_attr(feature = "serde", serde(tag = "type"))]
3432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3433#[repr(u32)]
3434#[doc = "Enumeration of sensor orientation, according to its rotations"]
3435pub enum MavSensorOrientation {
3436    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3437    MAV_SENSOR_ROTATION_NONE = 0,
3438    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3439    MAV_SENSOR_ROTATION_YAW_45 = 1,
3440    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3441    MAV_SENSOR_ROTATION_YAW_90 = 2,
3442    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3443    MAV_SENSOR_ROTATION_YAW_135 = 3,
3444    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3445    MAV_SENSOR_ROTATION_YAW_180 = 4,
3446    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3447    MAV_SENSOR_ROTATION_YAW_225 = 5,
3448    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3449    MAV_SENSOR_ROTATION_YAW_270 = 6,
3450    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3451    MAV_SENSOR_ROTATION_YAW_315 = 7,
3452    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3453    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3454    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3455    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3456    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3457    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3458    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3459    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3460    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3461    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3462    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3463    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3464    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3465    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3466    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3467    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3468    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3469    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3470    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3471    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3472    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3473    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3474    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3475    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3476    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3477    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3478    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3479    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3480    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3481    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3482    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3483    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3484    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3485    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3486    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3487    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3488    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3489    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3490    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3491    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3492    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3493    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3494    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3495    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3496    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3497    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3498    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3499    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3500    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3501    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3502    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3503    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3504    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3505    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3506    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3507    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3508    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3509    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3510    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3511    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3512    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3513    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3514    #[doc = "Pitch: 315"]
3515    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3516    #[doc = "Roll: 90, Pitch: 315"]
3517    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3518    #[doc = "Custom orientation"]
3519    MAV_SENSOR_ROTATION_CUSTOM = 100,
3520}
3521impl MavSensorOrientation {
3522    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3523}
3524impl Default for MavSensorOrientation {
3525    fn default() -> Self {
3526        Self::DEFAULT
3527    }
3528}
3529#[cfg_attr(feature = "ts", derive(TS))]
3530#[cfg_attr(feature = "ts", ts(export))]
3531#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3533#[cfg_attr(feature = "serde", serde(tag = "type"))]
3534#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3535#[repr(u32)]
3536#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3537pub enum MavSeverity {
3538    #[doc = "System is unusable. This is a \"panic\" condition."]
3539    MAV_SEVERITY_EMERGENCY = 0,
3540    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3541    MAV_SEVERITY_ALERT = 1,
3542    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3543    MAV_SEVERITY_CRITICAL = 2,
3544    #[doc = "Indicates an error in secondary/redundant systems."]
3545    MAV_SEVERITY_ERROR = 3,
3546    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3547    MAV_SEVERITY_WARNING = 4,
3548    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3549    MAV_SEVERITY_NOTICE = 5,
3550    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3551    MAV_SEVERITY_INFO = 6,
3552    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3553    MAV_SEVERITY_DEBUG = 7,
3554}
3555impl MavSeverity {
3556    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3557}
3558impl Default for MavSeverity {
3559    fn default() -> Self {
3560        Self::DEFAULT
3561    }
3562}
3563#[cfg_attr(feature = "ts", derive(TS))]
3564#[cfg_attr(feature = "ts", ts(export))]
3565#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3566#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3567#[cfg_attr(feature = "serde", serde(tag = "type"))]
3568#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3569#[repr(u32)]
3570#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3571pub enum MavStandardMode {
3572    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3573    MAV_STANDARD_MODE_NON_STANDARD = 0,
3574    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3575    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3576    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3577    MAV_STANDARD_MODE_ORBIT = 2,
3578    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3579    MAV_STANDARD_MODE_CRUISE = 3,
3580    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3581    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3582    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3583    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3584    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3585    MAV_STANDARD_MODE_MISSION = 6,
3586    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3587    MAV_STANDARD_MODE_LAND = 7,
3588    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3589    MAV_STANDARD_MODE_TAKEOFF = 8,
3590}
3591impl MavStandardMode {
3592    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3593}
3594impl Default for MavStandardMode {
3595    fn default() -> Self {
3596        Self::DEFAULT
3597    }
3598}
3599#[cfg_attr(feature = "ts", derive(TS))]
3600#[cfg_attr(feature = "ts", ts(export))]
3601#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3602#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3603#[cfg_attr(feature = "serde", serde(tag = "type"))]
3604#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3605#[repr(u32)]
3606pub enum MavState {
3607    #[doc = "Uninitialized system, state is unknown."]
3608    MAV_STATE_UNINIT = 0,
3609    #[doc = "System is booting up."]
3610    MAV_STATE_BOOT = 1,
3611    #[doc = "System is calibrating and not flight-ready."]
3612    MAV_STATE_CALIBRATING = 2,
3613    #[doc = "System is grounded and on standby. It can be launched any time."]
3614    MAV_STATE_STANDBY = 3,
3615    #[doc = "System is active and might be already airborne. Motors are engaged."]
3616    MAV_STATE_ACTIVE = 4,
3617    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3618    MAV_STATE_CRITICAL = 5,
3619    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3620    MAV_STATE_EMERGENCY = 6,
3621    #[doc = "System just initialized its power-down sequence, will shut down now."]
3622    MAV_STATE_POWEROFF = 7,
3623    #[doc = "System is terminating itself (failsafe or commanded)."]
3624    MAV_STATE_FLIGHT_TERMINATION = 8,
3625}
3626impl MavState {
3627    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3628}
3629impl Default for MavState {
3630    fn default() -> Self {
3631        Self::DEFAULT
3632    }
3633}
3634bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3635impl MavSysStatusSensor {
3636    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3637}
3638impl Default for MavSysStatusSensor {
3639    fn default() -> Self {
3640        Self::DEFAULT
3641    }
3642}
3643bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3644impl MavSysStatusSensorExtended {
3645    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3646}
3647impl Default for MavSysStatusSensorExtended {
3648    fn default() -> Self {
3649        Self::DEFAULT
3650    }
3651}
3652#[cfg_attr(feature = "ts", derive(TS))]
3653#[cfg_attr(feature = "ts", ts(export))]
3654#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3656#[cfg_attr(feature = "serde", serde(tag = "type"))]
3657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3658#[repr(u32)]
3659pub enum MavTunnelPayloadType {
3660    #[doc = "Encoding of payload unknown."]
3661    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3662    #[doc = "Registered for STorM32 gimbal controller."]
3663    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3664    #[doc = "Registered for STorM32 gimbal controller."]
3665    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3666    #[doc = "Registered for STorM32 gimbal controller."]
3667    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3668    #[doc = "Registered for STorM32 gimbal controller."]
3669    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3670    #[doc = "Registered for STorM32 gimbal controller."]
3671    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3672    #[doc = "Registered for STorM32 gimbal controller."]
3673    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3674    #[doc = "Registered for STorM32 gimbal controller."]
3675    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3676    #[doc = "Registered for STorM32 gimbal controller."]
3677    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3678    #[doc = "Registered for STorM32 gimbal controller."]
3679    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3680    #[doc = "Registered for STorM32 gimbal controller."]
3681    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3682    #[doc = "Registered for ModalAI remote OSD protocol."]
3683    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3684    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3685    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3686    #[doc = "Registered for ModalAI vendor use."]
3687    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3688}
3689impl MavTunnelPayloadType {
3690    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3691}
3692impl Default for MavTunnelPayloadType {
3693    fn default() -> Self {
3694        Self::DEFAULT
3695    }
3696}
3697#[cfg_attr(feature = "ts", derive(TS))]
3698#[cfg_attr(feature = "ts", ts(export))]
3699#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3701#[cfg_attr(feature = "serde", serde(tag = "type"))]
3702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3703#[repr(u32)]
3704#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3705pub enum MavType {
3706    #[doc = "Generic micro air vehicle"]
3707    MAV_TYPE_GENERIC = 0,
3708    #[doc = "Fixed wing aircraft."]
3709    MAV_TYPE_FIXED_WING = 1,
3710    #[doc = "Quadrotor"]
3711    MAV_TYPE_QUADROTOR = 2,
3712    #[doc = "Coaxial helicopter"]
3713    MAV_TYPE_COAXIAL = 3,
3714    #[doc = "Normal helicopter with tail rotor."]
3715    MAV_TYPE_HELICOPTER = 4,
3716    #[doc = "Ground installation"]
3717    MAV_TYPE_ANTENNA_TRACKER = 5,
3718    #[doc = "Operator control unit / ground control station"]
3719    MAV_TYPE_GCS = 6,
3720    #[doc = "Airship, controlled"]
3721    MAV_TYPE_AIRSHIP = 7,
3722    #[doc = "Free balloon, uncontrolled"]
3723    MAV_TYPE_FREE_BALLOON = 8,
3724    #[doc = "Rocket"]
3725    MAV_TYPE_ROCKET = 9,
3726    #[doc = "Ground rover"]
3727    MAV_TYPE_GROUND_ROVER = 10,
3728    #[doc = "Surface vessel, boat, ship"]
3729    MAV_TYPE_SURFACE_BOAT = 11,
3730    #[doc = "Submarine"]
3731    MAV_TYPE_SUBMARINE = 12,
3732    #[doc = "Hexarotor"]
3733    MAV_TYPE_HEXAROTOR = 13,
3734    #[doc = "Octorotor"]
3735    MAV_TYPE_OCTOROTOR = 14,
3736    #[doc = "Tricopter"]
3737    MAV_TYPE_TRICOPTER = 15,
3738    #[doc = "Flapping wing"]
3739    MAV_TYPE_FLAPPING_WING = 16,
3740    #[doc = "Kite"]
3741    MAV_TYPE_KITE = 17,
3742    #[doc = "Onboard companion controller"]
3743    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3744    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3745    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3746    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3747    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3748    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3749    MAV_TYPE_VTOL_TILTROTOR = 21,
3750    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3751    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3752    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3753    MAV_TYPE_VTOL_TAILSITTER = 23,
3754    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3755    MAV_TYPE_VTOL_TILTWING = 24,
3756    #[doc = "VTOL reserved 5"]
3757    MAV_TYPE_VTOL_RESERVED5 = 25,
3758    #[doc = "Gimbal"]
3759    MAV_TYPE_GIMBAL = 26,
3760    #[doc = "ADSB system"]
3761    MAV_TYPE_ADSB = 27,
3762    #[doc = "Steerable, nonrigid airfoil"]
3763    MAV_TYPE_PARAFOIL = 28,
3764    #[doc = "Dodecarotor"]
3765    MAV_TYPE_DODECAROTOR = 29,
3766    #[doc = "Camera"]
3767    MAV_TYPE_CAMERA = 30,
3768    #[doc = "Charging station"]
3769    MAV_TYPE_CHARGING_STATION = 31,
3770    #[doc = "FLARM collision avoidance system"]
3771    MAV_TYPE_FLARM = 32,
3772    #[doc = "Servo"]
3773    MAV_TYPE_SERVO = 33,
3774    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3775    MAV_TYPE_ODID = 34,
3776    #[doc = "Decarotor"]
3777    MAV_TYPE_DECAROTOR = 35,
3778    #[doc = "Battery"]
3779    MAV_TYPE_BATTERY = 36,
3780    #[doc = "Parachute"]
3781    MAV_TYPE_PARACHUTE = 37,
3782    #[doc = "Log"]
3783    MAV_TYPE_LOG = 38,
3784    #[doc = "OSD"]
3785    MAV_TYPE_OSD = 39,
3786    #[doc = "IMU"]
3787    MAV_TYPE_IMU = 40,
3788    #[doc = "GPS"]
3789    MAV_TYPE_GPS = 41,
3790    #[doc = "Winch"]
3791    MAV_TYPE_WINCH = 42,
3792    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3793    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3794    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3795    MAV_TYPE_ILLUMINATOR = 44,
3796    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3797    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3798}
3799impl MavType {
3800    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3801}
3802impl Default for MavType {
3803    fn default() -> Self {
3804        Self::DEFAULT
3805    }
3806}
3807#[cfg_attr(feature = "ts", derive(TS))]
3808#[cfg_attr(feature = "ts", ts(export))]
3809#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3811#[cfg_attr(feature = "serde", serde(tag = "type"))]
3812#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3813#[repr(u32)]
3814#[doc = "Enumeration of VTOL states"]
3815pub enum MavVtolState {
3816    #[doc = "MAV is not configured as VTOL"]
3817    MAV_VTOL_STATE_UNDEFINED = 0,
3818    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3819    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3820    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3821    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3822    #[doc = "VTOL is in multicopter state"]
3823    MAV_VTOL_STATE_MC = 3,
3824    #[doc = "VTOL is in fixed-wing state"]
3825    MAV_VTOL_STATE_FW = 4,
3826}
3827impl MavVtolState {
3828    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3829}
3830impl Default for MavVtolState {
3831    fn default() -> Self {
3832        Self::DEFAULT
3833    }
3834}
3835bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3836impl MavWinchStatusFlag {
3837    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3838}
3839impl Default for MavWinchStatusFlag {
3840    fn default() -> Self {
3841        Self::DEFAULT
3842    }
3843}
3844#[cfg_attr(feature = "ts", derive(TS))]
3845#[cfg_attr(feature = "ts", ts(export))]
3846#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3848#[cfg_attr(feature = "serde", serde(tag = "type"))]
3849#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3850#[repr(u32)]
3851pub enum MavlinkDataStreamType {
3852    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3853    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3854    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3855    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3856    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3857    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3858}
3859impl MavlinkDataStreamType {
3860    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3861}
3862impl Default for MavlinkDataStreamType {
3863    fn default() -> Self {
3864        Self::DEFAULT
3865    }
3866}
3867#[cfg_attr(feature = "ts", derive(TS))]
3868#[cfg_attr(feature = "ts", ts(export))]
3869#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3871#[cfg_attr(feature = "serde", serde(tag = "type"))]
3872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3873#[repr(u32)]
3874#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3875pub enum MissionState {
3876    #[doc = "The mission status reporting is not supported."]
3877    MISSION_STATE_UNKNOWN = 0,
3878    #[doc = "No mission on the vehicle."]
3879    MISSION_STATE_NO_MISSION = 1,
3880    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3881    MISSION_STATE_NOT_STARTED = 2,
3882    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3883    MISSION_STATE_ACTIVE = 3,
3884    #[doc = "Mission is paused when in auto mode."]
3885    MISSION_STATE_PAUSED = 4,
3886    #[doc = "Mission has executed all mission items."]
3887    MISSION_STATE_COMPLETE = 5,
3888}
3889impl MissionState {
3890    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3891}
3892impl Default for MissionState {
3893    fn default() -> Self {
3894        Self::DEFAULT
3895    }
3896}
3897#[cfg_attr(feature = "ts", derive(TS))]
3898#[cfg_attr(feature = "ts", ts(export))]
3899#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3900#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3901#[cfg_attr(feature = "serde", serde(tag = "type"))]
3902#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3903#[repr(u32)]
3904#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3905pub enum MotorTestOrder {
3906    #[doc = "Default autopilot motor test method."]
3907    MOTOR_TEST_ORDER_DEFAULT = 0,
3908    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3909    MOTOR_TEST_ORDER_SEQUENCE = 1,
3910    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3911    MOTOR_TEST_ORDER_BOARD = 2,
3912}
3913impl MotorTestOrder {
3914    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3915}
3916impl Default for MotorTestOrder {
3917    fn default() -> Self {
3918        Self::DEFAULT
3919    }
3920}
3921#[cfg_attr(feature = "ts", derive(TS))]
3922#[cfg_attr(feature = "ts", ts(export))]
3923#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3924#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3925#[cfg_attr(feature = "serde", serde(tag = "type"))]
3926#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3927#[repr(u32)]
3928#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3929pub enum MotorTestThrottleType {
3930    #[doc = "Throttle as a percentage (0 ~ 100)"]
3931    MOTOR_TEST_THROTTLE_PERCENT = 0,
3932    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3933    MOTOR_TEST_THROTTLE_PWM = 1,
3934    #[doc = "Throttle pass-through from pilot's transmitter."]
3935    MOTOR_TEST_THROTTLE_PILOT = 2,
3936    #[doc = "Per-motor compass calibration test."]
3937    MOTOR_TEST_COMPASS_CAL = 3,
3938}
3939impl MotorTestThrottleType {
3940    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3941}
3942impl Default for MotorTestThrottleType {
3943    fn default() -> Self {
3944        Self::DEFAULT
3945    }
3946}
3947#[cfg_attr(feature = "ts", derive(TS))]
3948#[cfg_attr(feature = "ts", ts(export))]
3949#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3950#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3951#[cfg_attr(feature = "serde", serde(tag = "type"))]
3952#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3953#[repr(u32)]
3954pub enum NavVtolLandOptions {
3955    #[doc = "Default autopilot landing behaviour."]
3956    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3957    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3958    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3959    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3960    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3961}
3962impl NavVtolLandOptions {
3963    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3964}
3965impl Default for NavVtolLandOptions {
3966    fn default() -> Self {
3967        Self::DEFAULT
3968    }
3969}
3970#[cfg_attr(feature = "ts", derive(TS))]
3971#[cfg_attr(feature = "ts", ts(export))]
3972#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3974#[cfg_attr(feature = "serde", serde(tag = "type"))]
3975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3976#[repr(u32)]
3977#[doc = "Yaw behaviour during orbit flight."]
3978pub enum OrbitYawBehaviour {
3979    #[doc = "Vehicle front points to the center (default)."]
3980    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3981    #[doc = "Vehicle front holds heading when message received."]
3982    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3983    #[doc = "Yaw uncontrolled."]
3984    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3985    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3986    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3987    #[doc = "Yaw controlled by RC input."]
3988    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3989    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3990    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3991}
3992impl OrbitYawBehaviour {
3993    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3994}
3995impl Default for OrbitYawBehaviour {
3996    fn default() -> Self {
3997        Self::DEFAULT
3998    }
3999}
4000#[cfg_attr(feature = "ts", derive(TS))]
4001#[cfg_attr(feature = "ts", ts(export))]
4002#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4003#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4004#[cfg_attr(feature = "serde", serde(tag = "type"))]
4005#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4006#[repr(u32)]
4007#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
4008pub enum ParachuteAction {
4009    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
4010    PARACHUTE_DISABLE = 0,
4011    #[doc = "Enable auto-release of parachute."]
4012    PARACHUTE_ENABLE = 1,
4013    #[doc = "Release parachute and kill motors."]
4014    PARACHUTE_RELEASE = 2,
4015}
4016impl ParachuteAction {
4017    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
4018}
4019impl Default for ParachuteAction {
4020    fn default() -> Self {
4021        Self::DEFAULT
4022    }
4023}
4024#[cfg_attr(feature = "ts", derive(TS))]
4025#[cfg_attr(feature = "ts", ts(export))]
4026#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4027#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4028#[cfg_attr(feature = "serde", serde(tag = "type"))]
4029#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4030#[repr(u32)]
4031#[doc = "Result from PARAM_EXT_SET message."]
4032pub enum ParamAck {
4033    #[doc = "Parameter value ACCEPTED and SET"]
4034    PARAM_ACK_ACCEPTED = 0,
4035    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
4036    PARAM_ACK_VALUE_UNSUPPORTED = 1,
4037    #[doc = "Parameter failed to set"]
4038    PARAM_ACK_FAILED = 2,
4039    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
4040    PARAM_ACK_IN_PROGRESS = 3,
4041}
4042impl ParamAck {
4043    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
4044}
4045impl Default for ParamAck {
4046    fn default() -> Self {
4047        Self::DEFAULT
4048    }
4049}
4050bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
4051impl PositionTargetTypemask {
4052    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4053}
4054impl Default for PositionTargetTypemask {
4055    fn default() -> Self {
4056        Self::DEFAULT
4057    }
4058}
4059#[cfg_attr(feature = "ts", derive(TS))]
4060#[cfg_attr(feature = "ts", ts(export))]
4061#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4063#[cfg_attr(feature = "serde", serde(tag = "type"))]
4064#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4065#[repr(u32)]
4066#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4067pub enum PrecisionLandMode {
4068    #[doc = "Normal (non-precision) landing."]
4069    PRECISION_LAND_MODE_DISABLED = 0,
4070    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4071    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4072    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4073    PRECISION_LAND_MODE_REQUIRED = 2,
4074}
4075impl PrecisionLandMode {
4076    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4077}
4078impl Default for PrecisionLandMode {
4079    fn default() -> Self {
4080        Self::DEFAULT
4081    }
4082}
4083#[cfg_attr(feature = "ts", derive(TS))]
4084#[cfg_attr(feature = "ts", ts(export))]
4085#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4087#[cfg_attr(feature = "serde", serde(tag = "type"))]
4088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4089#[repr(u32)]
4090#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4091pub enum PreflightStorageMissionAction {
4092    #[doc = "Read current mission data from persistent storage"]
4093    MISSION_READ_PERSISTENT = 0,
4094    #[doc = "Write current mission data to persistent storage"]
4095    MISSION_WRITE_PERSISTENT = 1,
4096    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4097    MISSION_RESET_DEFAULT = 2,
4098}
4099impl PreflightStorageMissionAction {
4100    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4101}
4102impl Default for PreflightStorageMissionAction {
4103    fn default() -> Self {
4104        Self::DEFAULT
4105    }
4106}
4107#[cfg_attr(feature = "ts", derive(TS))]
4108#[cfg_attr(feature = "ts", ts(export))]
4109#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4111#[cfg_attr(feature = "serde", serde(tag = "type"))]
4112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4113#[repr(u32)]
4114#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4115pub enum PreflightStorageParameterAction {
4116    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4117    PARAM_READ_PERSISTENT = 0,
4118    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4119    PARAM_WRITE_PERSISTENT = 1,
4120    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4121    PARAM_RESET_CONFIG_DEFAULT = 2,
4122    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4123    PARAM_RESET_SENSOR_DEFAULT = 3,
4124    #[doc = "Reset all parameters, including operation counters, to default values"]
4125    PARAM_RESET_ALL_DEFAULT = 4,
4126}
4127impl PreflightStorageParameterAction {
4128    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4129}
4130impl Default for PreflightStorageParameterAction {
4131    fn default() -> Self {
4132        Self::DEFAULT
4133    }
4134}
4135#[cfg_attr(feature = "ts", derive(TS))]
4136#[cfg_attr(feature = "ts", ts(export))]
4137#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4139#[cfg_attr(feature = "serde", serde(tag = "type"))]
4140#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4141#[repr(u32)]
4142#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4143pub enum RcSubType {
4144    #[doc = "Spektrum DSM2"]
4145    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4146    #[doc = "Spektrum DSMX"]
4147    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4148    #[doc = "Spektrum DSMX8"]
4149    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4150}
4151impl RcSubType {
4152    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4153}
4154impl Default for RcSubType {
4155    fn default() -> Self {
4156        Self::DEFAULT
4157    }
4158}
4159#[cfg_attr(feature = "ts", derive(TS))]
4160#[cfg_attr(feature = "ts", ts(export))]
4161#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4163#[cfg_attr(feature = "serde", serde(tag = "type"))]
4164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4165#[repr(u32)]
4166#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4167pub enum RcType {
4168    #[doc = "Spektrum"]
4169    RC_TYPE_SPEKTRUM = 0,
4170    #[doc = "CRSF"]
4171    RC_TYPE_CRSF = 1,
4172}
4173impl RcType {
4174    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4175}
4176impl Default for RcType {
4177    fn default() -> Self {
4178        Self::DEFAULT
4179    }
4180}
4181#[cfg_attr(feature = "ts", derive(TS))]
4182#[cfg_attr(feature = "ts", ts(export))]
4183#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4185#[cfg_attr(feature = "serde", serde(tag = "type"))]
4186#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4187#[repr(u32)]
4188#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4189pub enum RebootShutdownConditions {
4190    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4191    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4192    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4193    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4194}
4195impl RebootShutdownConditions {
4196    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4197}
4198impl Default for RebootShutdownConditions {
4199    fn default() -> Self {
4200        Self::DEFAULT
4201    }
4202}
4203#[cfg_attr(feature = "ts", derive(TS))]
4204#[cfg_attr(feature = "ts", ts(export))]
4205#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4207#[cfg_attr(feature = "serde", serde(tag = "type"))]
4208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4209#[repr(u32)]
4210#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4211pub enum RtkBaselineCoordinateSystem {
4212    #[doc = "Earth-centered, Earth-fixed"]
4213    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4214    #[doc = "RTK basestation centered, north, east, down"]
4215    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4216}
4217impl RtkBaselineCoordinateSystem {
4218    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4219}
4220impl Default for RtkBaselineCoordinateSystem {
4221    fn default() -> Self {
4222        Self::DEFAULT
4223    }
4224}
4225#[cfg_attr(feature = "ts", derive(TS))]
4226#[cfg_attr(feature = "ts", ts(export))]
4227#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4228#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4229#[cfg_attr(feature = "serde", serde(tag = "type"))]
4230#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4231#[repr(u32)]
4232#[doc = "Possible safety switch states."]
4233pub enum SafetySwitchState {
4234    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4235    SAFETY_SWITCH_STATE_SAFE = 0,
4236    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4237    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4238}
4239impl SafetySwitchState {
4240    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4241}
4242impl Default for SafetySwitchState {
4243    fn default() -> Self {
4244        Self::DEFAULT
4245    }
4246}
4247#[cfg_attr(feature = "ts", derive(TS))]
4248#[cfg_attr(feature = "ts", ts(export))]
4249#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4250#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4251#[cfg_attr(feature = "serde", serde(tag = "type"))]
4252#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4253#[repr(u32)]
4254#[doc = "SERIAL_CONTROL device types"]
4255pub enum SerialControlDev {
4256    #[doc = "First telemetry port"]
4257    SERIAL_CONTROL_DEV_TELEM1 = 0,
4258    #[doc = "Second telemetry port"]
4259    SERIAL_CONTROL_DEV_TELEM2 = 1,
4260    #[doc = "First GPS port"]
4261    SERIAL_CONTROL_DEV_GPS1 = 2,
4262    #[doc = "Second GPS port"]
4263    SERIAL_CONTROL_DEV_GPS2 = 3,
4264    #[doc = "system shell"]
4265    SERIAL_CONTROL_DEV_SHELL = 10,
4266    #[doc = "SERIAL0"]
4267    SERIAL_CONTROL_SERIAL0 = 100,
4268    #[doc = "SERIAL1"]
4269    SERIAL_CONTROL_SERIAL1 = 101,
4270    #[doc = "SERIAL2"]
4271    SERIAL_CONTROL_SERIAL2 = 102,
4272    #[doc = "SERIAL3"]
4273    SERIAL_CONTROL_SERIAL3 = 103,
4274    #[doc = "SERIAL4"]
4275    SERIAL_CONTROL_SERIAL4 = 104,
4276    #[doc = "SERIAL5"]
4277    SERIAL_CONTROL_SERIAL5 = 105,
4278    #[doc = "SERIAL6"]
4279    SERIAL_CONTROL_SERIAL6 = 106,
4280    #[doc = "SERIAL7"]
4281    SERIAL_CONTROL_SERIAL7 = 107,
4282    #[doc = "SERIAL8"]
4283    SERIAL_CONTROL_SERIAL8 = 108,
4284    #[doc = "SERIAL9"]
4285    SERIAL_CONTROL_SERIAL9 = 109,
4286}
4287impl SerialControlDev {
4288    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4289}
4290impl Default for SerialControlDev {
4291    fn default() -> Self {
4292        Self::DEFAULT
4293    }
4294}
4295bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4296impl SerialControlFlag {
4297    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4298}
4299impl Default for SerialControlFlag {
4300    fn default() -> Self {
4301        Self::DEFAULT
4302    }
4303}
4304#[cfg_attr(feature = "ts", derive(TS))]
4305#[cfg_attr(feature = "ts", ts(export))]
4306#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4307#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4308#[cfg_attr(feature = "serde", serde(tag = "type"))]
4309#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4310#[repr(u32)]
4311#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4312pub enum SetFocusType {
4313    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4314    FOCUS_TYPE_STEP = 0,
4315    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4316    FOCUS_TYPE_CONTINUOUS = 1,
4317    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4318    FOCUS_TYPE_RANGE = 2,
4319    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4320    FOCUS_TYPE_METERS = 3,
4321    #[doc = "Focus automatically."]
4322    FOCUS_TYPE_AUTO = 4,
4323    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4324    FOCUS_TYPE_AUTO_SINGLE = 5,
4325    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4326    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4327}
4328impl SetFocusType {
4329    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4330}
4331impl Default for SetFocusType {
4332    fn default() -> Self {
4333        Self::DEFAULT
4334    }
4335}
4336#[cfg_attr(feature = "ts", derive(TS))]
4337#[cfg_attr(feature = "ts", ts(export))]
4338#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4340#[cfg_attr(feature = "serde", serde(tag = "type"))]
4341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4342#[repr(u32)]
4343#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4344pub enum SpeedType {
4345    #[doc = "Airspeed"]
4346    SPEED_TYPE_AIRSPEED = 0,
4347    #[doc = "Groundspeed"]
4348    SPEED_TYPE_GROUNDSPEED = 1,
4349    #[doc = "Climb speed"]
4350    SPEED_TYPE_CLIMB_SPEED = 2,
4351    #[doc = "Descent speed"]
4352    SPEED_TYPE_DESCENT_SPEED = 3,
4353}
4354impl SpeedType {
4355    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4356}
4357impl Default for SpeedType {
4358    fn default() -> Self {
4359        Self::DEFAULT
4360    }
4361}
4362#[cfg_attr(feature = "ts", derive(TS))]
4363#[cfg_attr(feature = "ts", ts(export))]
4364#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4366#[cfg_attr(feature = "serde", serde(tag = "type"))]
4367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4368#[repr(u32)]
4369#[doc = "Flags to indicate the status of camera storage."]
4370pub enum StorageStatus {
4371    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4372    STORAGE_STATUS_EMPTY = 0,
4373    #[doc = "Storage present but unformatted."]
4374    STORAGE_STATUS_UNFORMATTED = 1,
4375    #[doc = "Storage present and ready."]
4376    STORAGE_STATUS_READY = 2,
4377    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4378    STORAGE_STATUS_NOT_SUPPORTED = 3,
4379}
4380impl StorageStatus {
4381    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4382}
4383impl Default for StorageStatus {
4384    fn default() -> Self {
4385        Self::DEFAULT
4386    }
4387}
4388#[cfg_attr(feature = "ts", derive(TS))]
4389#[cfg_attr(feature = "ts", ts(export))]
4390#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4392#[cfg_attr(feature = "serde", serde(tag = "type"))]
4393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4394#[repr(u32)]
4395#[doc = "Flags to indicate the type of storage."]
4396pub enum StorageType {
4397    #[doc = "Storage type is not known."]
4398    STORAGE_TYPE_UNKNOWN = 0,
4399    #[doc = "Storage type is USB device."]
4400    STORAGE_TYPE_USB_STICK = 1,
4401    #[doc = "Storage type is SD card."]
4402    STORAGE_TYPE_SD = 2,
4403    #[doc = "Storage type is microSD card."]
4404    STORAGE_TYPE_MICROSD = 3,
4405    #[doc = "Storage type is CFast."]
4406    STORAGE_TYPE_CF = 4,
4407    #[doc = "Storage type is CFexpress."]
4408    STORAGE_TYPE_CFE = 5,
4409    #[doc = "Storage type is XQD."]
4410    STORAGE_TYPE_XQD = 6,
4411    #[doc = "Storage type is HD mass storage type."]
4412    STORAGE_TYPE_HD = 7,
4413    #[doc = "Storage type is other, not listed type."]
4414    STORAGE_TYPE_OTHER = 254,
4415}
4416impl StorageType {
4417    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4418}
4419impl Default for StorageType {
4420    fn default() -> Self {
4421        Self::DEFAULT
4422    }
4423}
4424bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4425impl StorageUsageFlag {
4426    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4427}
4428impl Default for StorageUsageFlag {
4429    fn default() -> Self {
4430        Self::DEFAULT
4431    }
4432}
4433#[cfg_attr(feature = "ts", derive(TS))]
4434#[cfg_attr(feature = "ts", ts(export))]
4435#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4436#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4437#[cfg_attr(feature = "serde", serde(tag = "type"))]
4438#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4439#[repr(u32)]
4440#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4441pub enum TuneFormat {
4442    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4443    TUNE_FORMAT_QBASIC1_1 = 1,
4444    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4445    TUNE_FORMAT_MML_MODERN = 2,
4446}
4447impl TuneFormat {
4448    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4449}
4450impl Default for TuneFormat {
4451    fn default() -> Self {
4452        Self::DEFAULT
4453    }
4454}
4455#[cfg_attr(feature = "ts", derive(TS))]
4456#[cfg_attr(feature = "ts", ts(export))]
4457#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4458#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4459#[cfg_attr(feature = "serde", serde(tag = "type"))]
4460#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4461#[repr(u32)]
4462#[doc = "Generalized UAVCAN node health"]
4463pub enum UavcanNodeHealth {
4464    #[doc = "The node is functioning properly."]
4465    UAVCAN_NODE_HEALTH_OK = 0,
4466    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4467    UAVCAN_NODE_HEALTH_WARNING = 1,
4468    #[doc = "The node has encountered a major failure."]
4469    UAVCAN_NODE_HEALTH_ERROR = 2,
4470    #[doc = "The node has suffered a fatal malfunction."]
4471    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4472}
4473impl UavcanNodeHealth {
4474    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4475}
4476impl Default for UavcanNodeHealth {
4477    fn default() -> Self {
4478        Self::DEFAULT
4479    }
4480}
4481#[cfg_attr(feature = "ts", derive(TS))]
4482#[cfg_attr(feature = "ts", ts(export))]
4483#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4484#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4485#[cfg_attr(feature = "serde", serde(tag = "type"))]
4486#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4487#[repr(u32)]
4488#[doc = "Generalized UAVCAN node mode"]
4489pub enum UavcanNodeMode {
4490    #[doc = "The node is performing its primary functions."]
4491    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4492    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4493    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4494    #[doc = "The node is under maintenance."]
4495    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4496    #[doc = "The node is in the process of updating its software."]
4497    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4498    #[doc = "The node is no longer available online."]
4499    UAVCAN_NODE_MODE_OFFLINE = 7,
4500}
4501impl UavcanNodeMode {
4502    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4503}
4504impl Default for UavcanNodeMode {
4505    fn default() -> Self {
4506        Self::DEFAULT
4507    }
4508}
4509bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4510impl UtmDataAvailFlags {
4511    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4512}
4513impl Default for UtmDataAvailFlags {
4514    fn default() -> Self {
4515        Self::DEFAULT
4516    }
4517}
4518#[cfg_attr(feature = "ts", derive(TS))]
4519#[cfg_attr(feature = "ts", ts(export))]
4520#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4521#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4522#[cfg_attr(feature = "serde", serde(tag = "type"))]
4523#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4524#[repr(u32)]
4525#[doc = "Airborne status of UAS."]
4526pub enum UtmFlightState {
4527    #[doc = "The flight state can't be determined."]
4528    UTM_FLIGHT_STATE_UNKNOWN = 1,
4529    #[doc = "UAS on ground."]
4530    UTM_FLIGHT_STATE_GROUND = 2,
4531    #[doc = "UAS airborne."]
4532    UTM_FLIGHT_STATE_AIRBORNE = 3,
4533    #[doc = "UAS is in an emergency flight state."]
4534    UTM_FLIGHT_STATE_EMERGENCY = 16,
4535    #[doc = "UAS has no active controls."]
4536    UTM_FLIGHT_STATE_NOCTRL = 32,
4537}
4538impl UtmFlightState {
4539    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4540}
4541impl Default for UtmFlightState {
4542    fn default() -> Self {
4543        Self::DEFAULT
4544    }
4545}
4546#[cfg_attr(feature = "ts", derive(TS))]
4547#[cfg_attr(feature = "ts", ts(export))]
4548#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4549#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4550#[cfg_attr(feature = "serde", serde(tag = "type"))]
4551#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4552#[repr(u32)]
4553#[doc = "Video stream encodings"]
4554pub enum VideoStreamEncoding {
4555    #[doc = "Stream encoding is unknown"]
4556    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4557    #[doc = "Stream encoding is H.264"]
4558    VIDEO_STREAM_ENCODING_H264 = 1,
4559    #[doc = "Stream encoding is H.265"]
4560    VIDEO_STREAM_ENCODING_H265 = 2,
4561}
4562impl VideoStreamEncoding {
4563    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4564}
4565impl Default for VideoStreamEncoding {
4566    fn default() -> Self {
4567        Self::DEFAULT
4568    }
4569}
4570bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4571impl VideoStreamStatusFlags {
4572    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4573}
4574impl Default for VideoStreamStatusFlags {
4575    fn default() -> Self {
4576        Self::DEFAULT
4577    }
4578}
4579#[cfg_attr(feature = "ts", derive(TS))]
4580#[cfg_attr(feature = "ts", ts(export))]
4581#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4582#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4583#[cfg_attr(feature = "serde", serde(tag = "type"))]
4584#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4585#[repr(u32)]
4586#[doc = "Video stream types"]
4587pub enum VideoStreamType {
4588    #[doc = "Stream is RTSP"]
4589    VIDEO_STREAM_TYPE_RTSP = 0,
4590    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4591    VIDEO_STREAM_TYPE_RTPUDP = 1,
4592    #[doc = "Stream is MPEG on TCP"]
4593    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4594    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4595    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4596}
4597impl VideoStreamType {
4598    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4599}
4600impl Default for VideoStreamType {
4601    fn default() -> Self {
4602        Self::DEFAULT
4603    }
4604}
4605#[cfg_attr(feature = "ts", derive(TS))]
4606#[cfg_attr(feature = "ts", ts(export))]
4607#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4609#[cfg_attr(feature = "serde", serde(tag = "type"))]
4610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4611#[repr(u32)]
4612#[doc = "Direction of VTOL transition"]
4613pub enum VtolTransitionHeading {
4614    #[doc = "Respect the heading configuration of the vehicle."]
4615    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4616    #[doc = "Use the heading pointing towards the next waypoint."]
4617    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4618    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4619    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4620    #[doc = "Use the specified heading in parameter 4."]
4621    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4622    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4623    VTOL_TRANSITION_HEADING_ANY = 4,
4624}
4625impl VtolTransitionHeading {
4626    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4627}
4628impl Default for VtolTransitionHeading {
4629    fn default() -> Self {
4630        Self::DEFAULT
4631    }
4632}
4633#[cfg_attr(feature = "ts", derive(TS))]
4634#[cfg_attr(feature = "ts", ts(export))]
4635#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4637#[cfg_attr(feature = "serde", serde(tag = "type"))]
4638#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4639#[repr(u32)]
4640#[doc = "WiFi Mode."]
4641pub enum WifiConfigApMode {
4642    #[doc = "WiFi mode is undefined."]
4643    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4644    #[doc = "WiFi configured as an access point."]
4645    WIFI_CONFIG_AP_MODE_AP = 1,
4646    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4647    WIFI_CONFIG_AP_MODE_STATION = 2,
4648    #[doc = "WiFi disabled."]
4649    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4650}
4651impl WifiConfigApMode {
4652    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4653}
4654impl Default for WifiConfigApMode {
4655    fn default() -> Self {
4656        Self::DEFAULT
4657    }
4658}
4659#[cfg_attr(feature = "ts", derive(TS))]
4660#[cfg_attr(feature = "ts", ts(export))]
4661#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4662#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4663#[cfg_attr(feature = "serde", serde(tag = "type"))]
4664#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4665#[repr(u32)]
4666#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4667pub enum WifiConfigApResponse {
4668    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4669    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4670    #[doc = "Changes accepted."]
4671    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4672    #[doc = "Changes rejected."]
4673    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4674    #[doc = "Invalid Mode."]
4675    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4676    #[doc = "Invalid SSID."]
4677    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4678    #[doc = "Invalid Password."]
4679    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4680}
4681impl WifiConfigApResponse {
4682    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4683}
4684impl Default for WifiConfigApResponse {
4685    fn default() -> Self {
4686        Self::DEFAULT
4687    }
4688}
4689#[cfg_attr(feature = "ts", derive(TS))]
4690#[cfg_attr(feature = "ts", ts(export))]
4691#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4692#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4693#[cfg_attr(feature = "serde", serde(tag = "type"))]
4694#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4695#[repr(u32)]
4696#[doc = "Winch actions."]
4697pub enum WinchActions {
4698    #[doc = "Allow motor to freewheel."]
4699    WINCH_RELAXED = 0,
4700    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4701    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4702    #[doc = "Wind or unwind line at specified rate."]
4703    WINCH_RATE_CONTROL = 2,
4704    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4705    WINCH_LOCK = 3,
4706    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4707    WINCH_DELIVER = 4,
4708    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4709    WINCH_HOLD = 5,
4710    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4711    WINCH_RETRACT = 6,
4712    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4713    WINCH_LOAD_LINE = 7,
4714    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4715    WINCH_ABANDON_LINE = 8,
4716    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4717    WINCH_LOAD_PAYLOAD = 9,
4718}
4719impl WinchActions {
4720    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4721}
4722impl Default for WinchActions {
4723    fn default() -> Self {
4724        Self::DEFAULT
4725    }
4726}
4727#[doc = "Set the vehicle attitude and body angular rates."]
4728#[doc = ""]
4729#[doc = "ID: 140"]
4730#[derive(Debug, Clone, PartialEq)]
4731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4733#[cfg_attr(feature = "ts", derive(TS))]
4734#[cfg_attr(feature = "ts", ts(export))]
4735pub struct ACTUATOR_CONTROL_TARGET_DATA {
4736    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4737    pub time_usec: u64,
4738    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4739    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4740    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4741    pub controls: [f32; 8],
4742    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4743    pub group_mlx: u8,
4744}
4745impl ACTUATOR_CONTROL_TARGET_DATA {
4746    pub const ENCODED_LEN: usize = 41usize;
4747    pub const DEFAULT: Self = Self {
4748        time_usec: 0_u64,
4749        controls: [0.0_f32; 8usize],
4750        group_mlx: 0_u8,
4751    };
4752    #[cfg(feature = "arbitrary")]
4753    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4754        use arbitrary::{Arbitrary, Unstructured};
4755        let mut buf = [0u8; 1024];
4756        rng.fill_bytes(&mut buf);
4757        let mut unstructured = Unstructured::new(&buf);
4758        Self::arbitrary(&mut unstructured).unwrap_or_default()
4759    }
4760}
4761impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4762    fn default() -> Self {
4763        Self::DEFAULT.clone()
4764    }
4765}
4766impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4767    type Message = MavMessage;
4768    const ID: u32 = 140u32;
4769    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4770    const EXTRA_CRC: u8 = 181u8;
4771    const ENCODED_LEN: usize = 41usize;
4772    fn deser(
4773        _version: MavlinkVersion,
4774        __input: &[u8],
4775    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4776        let avail_len = __input.len();
4777        let mut payload_buf = [0; Self::ENCODED_LEN];
4778        let mut buf = if avail_len < Self::ENCODED_LEN {
4779            payload_buf[0..avail_len].copy_from_slice(__input);
4780            Bytes::new(&payload_buf)
4781        } else {
4782            Bytes::new(__input)
4783        };
4784        let mut __struct = Self::default();
4785        __struct.time_usec = buf.get_u64_le();
4786        for v in &mut __struct.controls {
4787            let val = buf.get_f32_le();
4788            *v = val;
4789        }
4790        __struct.group_mlx = buf.get_u8();
4791        Ok(__struct)
4792    }
4793    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4794        let mut __tmp = BytesMut::new(bytes);
4795        #[allow(clippy::absurd_extreme_comparisons)]
4796        #[allow(unused_comparisons)]
4797        if __tmp.remaining() < Self::ENCODED_LEN {
4798            panic!(
4799                "buffer is too small (need {} bytes, but got {})",
4800                Self::ENCODED_LEN,
4801                __tmp.remaining(),
4802            )
4803        }
4804        __tmp.put_u64_le(self.time_usec);
4805        for val in &self.controls {
4806            __tmp.put_f32_le(*val);
4807        }
4808        __tmp.put_u8(self.group_mlx);
4809        if matches!(version, MavlinkVersion::V2) {
4810            let len = __tmp.len();
4811            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4812        } else {
4813            __tmp.len()
4814        }
4815    }
4816}
4817#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4818#[doc = ""]
4819#[doc = "ID: 375"]
4820#[derive(Debug, Clone, PartialEq)]
4821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4823#[cfg_attr(feature = "ts", derive(TS))]
4824#[cfg_attr(feature = "ts", ts(export))]
4825pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4826    #[doc = "Timestamp (since system boot)."]
4827    pub time_usec: u64,
4828    #[doc = "Active outputs"]
4829    pub active: u32,
4830    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4831    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4832    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4833    pub actuator: [f32; 32],
4834}
4835impl ACTUATOR_OUTPUT_STATUS_DATA {
4836    pub const ENCODED_LEN: usize = 140usize;
4837    pub const DEFAULT: Self = Self {
4838        time_usec: 0_u64,
4839        active: 0_u32,
4840        actuator: [0.0_f32; 32usize],
4841    };
4842    #[cfg(feature = "arbitrary")]
4843    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4844        use arbitrary::{Arbitrary, Unstructured};
4845        let mut buf = [0u8; 1024];
4846        rng.fill_bytes(&mut buf);
4847        let mut unstructured = Unstructured::new(&buf);
4848        Self::arbitrary(&mut unstructured).unwrap_or_default()
4849    }
4850}
4851impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4852    fn default() -> Self {
4853        Self::DEFAULT.clone()
4854    }
4855}
4856impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4857    type Message = MavMessage;
4858    const ID: u32 = 375u32;
4859    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4860    const EXTRA_CRC: u8 = 251u8;
4861    const ENCODED_LEN: usize = 140usize;
4862    fn deser(
4863        _version: MavlinkVersion,
4864        __input: &[u8],
4865    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4866        let avail_len = __input.len();
4867        let mut payload_buf = [0; Self::ENCODED_LEN];
4868        let mut buf = if avail_len < Self::ENCODED_LEN {
4869            payload_buf[0..avail_len].copy_from_slice(__input);
4870            Bytes::new(&payload_buf)
4871        } else {
4872            Bytes::new(__input)
4873        };
4874        let mut __struct = Self::default();
4875        __struct.time_usec = buf.get_u64_le();
4876        __struct.active = buf.get_u32_le();
4877        for v in &mut __struct.actuator {
4878            let val = buf.get_f32_le();
4879            *v = val;
4880        }
4881        Ok(__struct)
4882    }
4883    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4884        let mut __tmp = BytesMut::new(bytes);
4885        #[allow(clippy::absurd_extreme_comparisons)]
4886        #[allow(unused_comparisons)]
4887        if __tmp.remaining() < Self::ENCODED_LEN {
4888            panic!(
4889                "buffer is too small (need {} bytes, but got {})",
4890                Self::ENCODED_LEN,
4891                __tmp.remaining(),
4892            )
4893        }
4894        __tmp.put_u64_le(self.time_usec);
4895        __tmp.put_u32_le(self.active);
4896        for val in &self.actuator {
4897            __tmp.put_f32_le(*val);
4898        }
4899        if matches!(version, MavlinkVersion::V2) {
4900            let len = __tmp.len();
4901            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4902        } else {
4903            __tmp.len()
4904        }
4905    }
4906}
4907#[doc = "The location and information of an ADSB vehicle."]
4908#[doc = ""]
4909#[doc = "ID: 246"]
4910#[derive(Debug, Clone, PartialEq)]
4911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4913#[cfg_attr(feature = "ts", derive(TS))]
4914#[cfg_attr(feature = "ts", ts(export))]
4915pub struct ADSB_VEHICLE_DATA {
4916    #[doc = "ICAO address"]
4917    pub ICAO_address: u32,
4918    #[doc = "Latitude"]
4919    pub lat: i32,
4920    #[doc = "Longitude"]
4921    pub lon: i32,
4922    #[doc = "Altitude(ASL)"]
4923    pub altitude: i32,
4924    #[doc = "Course over ground"]
4925    pub heading: u16,
4926    #[doc = "The horizontal velocity"]
4927    pub hor_velocity: u16,
4928    #[doc = "The vertical velocity. Positive is up"]
4929    pub ver_velocity: i16,
4930    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4931    pub flags: AdsbFlags,
4932    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4933    pub squawk: u16,
4934    #[doc = "ADSB altitude type."]
4935    pub altitude_type: AdsbAltitudeType,
4936    #[doc = "The callsign, 8+null"]
4937    #[cfg_attr(feature = "ts", ts(type = "string"))]
4938    pub callsign: CharArray<9>,
4939    #[doc = "ADSB emitter type."]
4940    pub emitter_type: AdsbEmitterType,
4941    #[doc = "Time since last communication in seconds"]
4942    pub tslc: u8,
4943}
4944impl ADSB_VEHICLE_DATA {
4945    pub const ENCODED_LEN: usize = 38usize;
4946    pub const DEFAULT: Self = Self {
4947        ICAO_address: 0_u32,
4948        lat: 0_i32,
4949        lon: 0_i32,
4950        altitude: 0_i32,
4951        heading: 0_u16,
4952        hor_velocity: 0_u16,
4953        ver_velocity: 0_i16,
4954        flags: AdsbFlags::DEFAULT,
4955        squawk: 0_u16,
4956        altitude_type: AdsbAltitudeType::DEFAULT,
4957        callsign: CharArray::new([0_u8; 9usize]),
4958        emitter_type: AdsbEmitterType::DEFAULT,
4959        tslc: 0_u8,
4960    };
4961    #[cfg(feature = "arbitrary")]
4962    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4963        use arbitrary::{Arbitrary, Unstructured};
4964        let mut buf = [0u8; 1024];
4965        rng.fill_bytes(&mut buf);
4966        let mut unstructured = Unstructured::new(&buf);
4967        Self::arbitrary(&mut unstructured).unwrap_or_default()
4968    }
4969}
4970impl Default for ADSB_VEHICLE_DATA {
4971    fn default() -> Self {
4972        Self::DEFAULT.clone()
4973    }
4974}
4975impl MessageData for ADSB_VEHICLE_DATA {
4976    type Message = MavMessage;
4977    const ID: u32 = 246u32;
4978    const NAME: &'static str = "ADSB_VEHICLE";
4979    const EXTRA_CRC: u8 = 184u8;
4980    const ENCODED_LEN: usize = 38usize;
4981    fn deser(
4982        _version: MavlinkVersion,
4983        __input: &[u8],
4984    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4985        let avail_len = __input.len();
4986        let mut payload_buf = [0; Self::ENCODED_LEN];
4987        let mut buf = if avail_len < Self::ENCODED_LEN {
4988            payload_buf[0..avail_len].copy_from_slice(__input);
4989            Bytes::new(&payload_buf)
4990        } else {
4991            Bytes::new(__input)
4992        };
4993        let mut __struct = Self::default();
4994        __struct.ICAO_address = buf.get_u32_le();
4995        __struct.lat = buf.get_i32_le();
4996        __struct.lon = buf.get_i32_le();
4997        __struct.altitude = buf.get_i32_le();
4998        __struct.heading = buf.get_u16_le();
4999        __struct.hor_velocity = buf.get_u16_le();
5000        __struct.ver_velocity = buf.get_i16_le();
5001        let tmp = buf.get_u16_le();
5002        __struct.flags = AdsbFlags::from_bits(tmp as <AdsbFlags as Flags>::Bits).ok_or(
5003            ::mavlink_core::error::ParserError::InvalidFlag {
5004                flag_type: "AdsbFlags",
5005                value: tmp as u64,
5006            },
5007        )?;
5008        __struct.squawk = buf.get_u16_le();
5009        let tmp = buf.get_u8();
5010        __struct.altitude_type =
5011            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5012                enum_type: "AdsbAltitudeType",
5013                value: tmp as u64,
5014            })?;
5015        let mut tmp = [0_u8; 9usize];
5016        for v in &mut tmp {
5017            *v = buf.get_u8();
5018        }
5019        __struct.callsign = CharArray::new(tmp);
5020        let tmp = buf.get_u8();
5021        __struct.emitter_type =
5022            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5023                enum_type: "AdsbEmitterType",
5024                value: tmp as u64,
5025            })?;
5026        __struct.tslc = buf.get_u8();
5027        Ok(__struct)
5028    }
5029    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5030        let mut __tmp = BytesMut::new(bytes);
5031        #[allow(clippy::absurd_extreme_comparisons)]
5032        #[allow(unused_comparisons)]
5033        if __tmp.remaining() < Self::ENCODED_LEN {
5034            panic!(
5035                "buffer is too small (need {} bytes, but got {})",
5036                Self::ENCODED_LEN,
5037                __tmp.remaining(),
5038            )
5039        }
5040        __tmp.put_u32_le(self.ICAO_address);
5041        __tmp.put_i32_le(self.lat);
5042        __tmp.put_i32_le(self.lon);
5043        __tmp.put_i32_le(self.altitude);
5044        __tmp.put_u16_le(self.heading);
5045        __tmp.put_u16_le(self.hor_velocity);
5046        __tmp.put_i16_le(self.ver_velocity);
5047        __tmp.put_u16_le(self.flags.bits() as u16);
5048        __tmp.put_u16_le(self.squawk);
5049        __tmp.put_u8(self.altitude_type as u8);
5050        for val in &self.callsign {
5051            __tmp.put_u8(*val);
5052        }
5053        __tmp.put_u8(self.emitter_type as u8);
5054        __tmp.put_u8(self.tslc);
5055        if matches!(version, MavlinkVersion::V2) {
5056            let len = __tmp.len();
5057            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5058        } else {
5059            __tmp.len()
5060        }
5061    }
5062}
5063#[doc = "The location and information of an AIS vessel."]
5064#[doc = ""]
5065#[doc = "ID: 301"]
5066#[derive(Debug, Clone, PartialEq)]
5067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5068#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5069#[cfg_attr(feature = "ts", derive(TS))]
5070#[cfg_attr(feature = "ts", ts(export))]
5071pub struct AIS_VESSEL_DATA {
5072    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5073    pub MMSI: u32,
5074    #[doc = "Latitude"]
5075    pub lat: i32,
5076    #[doc = "Longitude"]
5077    pub lon: i32,
5078    #[doc = "Course over ground"]
5079    pub COG: u16,
5080    #[doc = "True heading"]
5081    pub heading: u16,
5082    #[doc = "Speed over ground"]
5083    pub velocity: u16,
5084    #[doc = "Distance from lat/lon location to bow"]
5085    pub dimension_bow: u16,
5086    #[doc = "Distance from lat/lon location to stern"]
5087    pub dimension_stern: u16,
5088    #[doc = "Time since last communication in seconds"]
5089    pub tslc: u16,
5090    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5091    pub flags: AisFlags,
5092    #[doc = "Turn rate"]
5093    pub turn_rate: i8,
5094    #[doc = "Navigational status"]
5095    pub navigational_status: AisNavStatus,
5096    #[doc = "Type of vessels"]
5097    pub mavtype: AisType,
5098    #[doc = "Distance from lat/lon location to port side"]
5099    pub dimension_port: u8,
5100    #[doc = "Distance from lat/lon location to starboard side"]
5101    pub dimension_starboard: u8,
5102    #[doc = "The vessel callsign"]
5103    #[cfg_attr(feature = "ts", ts(type = "string"))]
5104    pub callsign: CharArray<7>,
5105    #[doc = "The vessel name"]
5106    #[cfg_attr(feature = "ts", ts(type = "string"))]
5107    pub name: CharArray<20>,
5108}
5109impl AIS_VESSEL_DATA {
5110    pub const ENCODED_LEN: usize = 58usize;
5111    pub const DEFAULT: Self = Self {
5112        MMSI: 0_u32,
5113        lat: 0_i32,
5114        lon: 0_i32,
5115        COG: 0_u16,
5116        heading: 0_u16,
5117        velocity: 0_u16,
5118        dimension_bow: 0_u16,
5119        dimension_stern: 0_u16,
5120        tslc: 0_u16,
5121        flags: AisFlags::DEFAULT,
5122        turn_rate: 0_i8,
5123        navigational_status: AisNavStatus::DEFAULT,
5124        mavtype: AisType::DEFAULT,
5125        dimension_port: 0_u8,
5126        dimension_starboard: 0_u8,
5127        callsign: CharArray::new([0_u8; 7usize]),
5128        name: CharArray::new([0_u8; 20usize]),
5129    };
5130    #[cfg(feature = "arbitrary")]
5131    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5132        use arbitrary::{Arbitrary, Unstructured};
5133        let mut buf = [0u8; 1024];
5134        rng.fill_bytes(&mut buf);
5135        let mut unstructured = Unstructured::new(&buf);
5136        Self::arbitrary(&mut unstructured).unwrap_or_default()
5137    }
5138}
5139impl Default for AIS_VESSEL_DATA {
5140    fn default() -> Self {
5141        Self::DEFAULT.clone()
5142    }
5143}
5144impl MessageData for AIS_VESSEL_DATA {
5145    type Message = MavMessage;
5146    const ID: u32 = 301u32;
5147    const NAME: &'static str = "AIS_VESSEL";
5148    const EXTRA_CRC: u8 = 243u8;
5149    const ENCODED_LEN: usize = 58usize;
5150    fn deser(
5151        _version: MavlinkVersion,
5152        __input: &[u8],
5153    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5154        let avail_len = __input.len();
5155        let mut payload_buf = [0; Self::ENCODED_LEN];
5156        let mut buf = if avail_len < Self::ENCODED_LEN {
5157            payload_buf[0..avail_len].copy_from_slice(__input);
5158            Bytes::new(&payload_buf)
5159        } else {
5160            Bytes::new(__input)
5161        };
5162        let mut __struct = Self::default();
5163        __struct.MMSI = buf.get_u32_le();
5164        __struct.lat = buf.get_i32_le();
5165        __struct.lon = buf.get_i32_le();
5166        __struct.COG = buf.get_u16_le();
5167        __struct.heading = buf.get_u16_le();
5168        __struct.velocity = buf.get_u16_le();
5169        __struct.dimension_bow = buf.get_u16_le();
5170        __struct.dimension_stern = buf.get_u16_le();
5171        __struct.tslc = buf.get_u16_le();
5172        let tmp = buf.get_u16_le();
5173        __struct.flags = AisFlags::from_bits(tmp as <AisFlags as Flags>::Bits).ok_or(
5174            ::mavlink_core::error::ParserError::InvalidFlag {
5175                flag_type: "AisFlags",
5176                value: tmp as u64,
5177            },
5178        )?;
5179        __struct.turn_rate = buf.get_i8();
5180        let tmp = buf.get_u8();
5181        __struct.navigational_status =
5182            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5183                enum_type: "AisNavStatus",
5184                value: tmp as u64,
5185            })?;
5186        let tmp = buf.get_u8();
5187        __struct.mavtype =
5188            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5189                enum_type: "AisType",
5190                value: tmp as u64,
5191            })?;
5192        __struct.dimension_port = buf.get_u8();
5193        __struct.dimension_starboard = buf.get_u8();
5194        let mut tmp = [0_u8; 7usize];
5195        for v in &mut tmp {
5196            *v = buf.get_u8();
5197        }
5198        __struct.callsign = CharArray::new(tmp);
5199        let mut tmp = [0_u8; 20usize];
5200        for v in &mut tmp {
5201            *v = buf.get_u8();
5202        }
5203        __struct.name = CharArray::new(tmp);
5204        Ok(__struct)
5205    }
5206    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5207        let mut __tmp = BytesMut::new(bytes);
5208        #[allow(clippy::absurd_extreme_comparisons)]
5209        #[allow(unused_comparisons)]
5210        if __tmp.remaining() < Self::ENCODED_LEN {
5211            panic!(
5212                "buffer is too small (need {} bytes, but got {})",
5213                Self::ENCODED_LEN,
5214                __tmp.remaining(),
5215            )
5216        }
5217        __tmp.put_u32_le(self.MMSI);
5218        __tmp.put_i32_le(self.lat);
5219        __tmp.put_i32_le(self.lon);
5220        __tmp.put_u16_le(self.COG);
5221        __tmp.put_u16_le(self.heading);
5222        __tmp.put_u16_le(self.velocity);
5223        __tmp.put_u16_le(self.dimension_bow);
5224        __tmp.put_u16_le(self.dimension_stern);
5225        __tmp.put_u16_le(self.tslc);
5226        __tmp.put_u16_le(self.flags.bits() as u16);
5227        __tmp.put_i8(self.turn_rate);
5228        __tmp.put_u8(self.navigational_status as u8);
5229        __tmp.put_u8(self.mavtype as u8);
5230        __tmp.put_u8(self.dimension_port);
5231        __tmp.put_u8(self.dimension_starboard);
5232        for val in &self.callsign {
5233            __tmp.put_u8(*val);
5234        }
5235        for val in &self.name {
5236            __tmp.put_u8(*val);
5237        }
5238        if matches!(version, MavlinkVersion::V2) {
5239            let len = __tmp.len();
5240            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5241        } else {
5242            __tmp.len()
5243        }
5244    }
5245}
5246#[doc = "The current system altitude."]
5247#[doc = ""]
5248#[doc = "ID: 141"]
5249#[derive(Debug, Clone, PartialEq)]
5250#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5252#[cfg_attr(feature = "ts", derive(TS))]
5253#[cfg_attr(feature = "ts", ts(export))]
5254pub struct ALTITUDE_DATA {
5255    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5256    pub time_usec: u64,
5257    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5258    pub altitude_monotonic: f32,
5259    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5260    pub altitude_amsl: f32,
5261    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5262    pub altitude_local: f32,
5263    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5264    pub altitude_relative: f32,
5265    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5266    pub altitude_terrain: f32,
5267    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5268    pub bottom_clearance: f32,
5269}
5270impl ALTITUDE_DATA {
5271    pub const ENCODED_LEN: usize = 32usize;
5272    pub const DEFAULT: Self = Self {
5273        time_usec: 0_u64,
5274        altitude_monotonic: 0.0_f32,
5275        altitude_amsl: 0.0_f32,
5276        altitude_local: 0.0_f32,
5277        altitude_relative: 0.0_f32,
5278        altitude_terrain: 0.0_f32,
5279        bottom_clearance: 0.0_f32,
5280    };
5281    #[cfg(feature = "arbitrary")]
5282    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5283        use arbitrary::{Arbitrary, Unstructured};
5284        let mut buf = [0u8; 1024];
5285        rng.fill_bytes(&mut buf);
5286        let mut unstructured = Unstructured::new(&buf);
5287        Self::arbitrary(&mut unstructured).unwrap_or_default()
5288    }
5289}
5290impl Default for ALTITUDE_DATA {
5291    fn default() -> Self {
5292        Self::DEFAULT.clone()
5293    }
5294}
5295impl MessageData for ALTITUDE_DATA {
5296    type Message = MavMessage;
5297    const ID: u32 = 141u32;
5298    const NAME: &'static str = "ALTITUDE";
5299    const EXTRA_CRC: u8 = 47u8;
5300    const ENCODED_LEN: usize = 32usize;
5301    fn deser(
5302        _version: MavlinkVersion,
5303        __input: &[u8],
5304    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5305        let avail_len = __input.len();
5306        let mut payload_buf = [0; Self::ENCODED_LEN];
5307        let mut buf = if avail_len < Self::ENCODED_LEN {
5308            payload_buf[0..avail_len].copy_from_slice(__input);
5309            Bytes::new(&payload_buf)
5310        } else {
5311            Bytes::new(__input)
5312        };
5313        let mut __struct = Self::default();
5314        __struct.time_usec = buf.get_u64_le();
5315        __struct.altitude_monotonic = buf.get_f32_le();
5316        __struct.altitude_amsl = buf.get_f32_le();
5317        __struct.altitude_local = buf.get_f32_le();
5318        __struct.altitude_relative = buf.get_f32_le();
5319        __struct.altitude_terrain = buf.get_f32_le();
5320        __struct.bottom_clearance = buf.get_f32_le();
5321        Ok(__struct)
5322    }
5323    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5324        let mut __tmp = BytesMut::new(bytes);
5325        #[allow(clippy::absurd_extreme_comparisons)]
5326        #[allow(unused_comparisons)]
5327        if __tmp.remaining() < Self::ENCODED_LEN {
5328            panic!(
5329                "buffer is too small (need {} bytes, but got {})",
5330                Self::ENCODED_LEN,
5331                __tmp.remaining(),
5332            )
5333        }
5334        __tmp.put_u64_le(self.time_usec);
5335        __tmp.put_f32_le(self.altitude_monotonic);
5336        __tmp.put_f32_le(self.altitude_amsl);
5337        __tmp.put_f32_le(self.altitude_local);
5338        __tmp.put_f32_le(self.altitude_relative);
5339        __tmp.put_f32_le(self.altitude_terrain);
5340        __tmp.put_f32_le(self.bottom_clearance);
5341        if matches!(version, MavlinkVersion::V2) {
5342            let len = __tmp.len();
5343            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5344        } else {
5345            __tmp.len()
5346        }
5347    }
5348}
5349#[doc = "ASL-fixed-wing controller data."]
5350#[doc = ""]
5351#[doc = "ID: 8004"]
5352#[derive(Debug, Clone, PartialEq)]
5353#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5354#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5355#[cfg_attr(feature = "ts", derive(TS))]
5356#[cfg_attr(feature = "ts", ts(export))]
5357pub struct ASLCTRL_DATA_DATA {
5358    #[doc = "Timestamp"]
5359    pub timestamp: u64,
5360    #[doc = "See sourcecode for a description of these values..."]
5361    pub h: f32,
5362    pub hRef: f32,
5363    pub hRef_t: f32,
5364    #[doc = "Pitch angle"]
5365    pub PitchAngle: f32,
5366    #[doc = "Pitch angle reference"]
5367    pub PitchAngleRef: f32,
5368    pub q: f32,
5369    pub qRef: f32,
5370    pub uElev: f32,
5371    pub uThrot: f32,
5372    pub uThrot2: f32,
5373    pub nZ: f32,
5374    #[doc = "Airspeed reference"]
5375    pub AirspeedRef: f32,
5376    #[doc = "Yaw angle"]
5377    pub YawAngle: f32,
5378    #[doc = "Yaw angle reference"]
5379    pub YawAngleRef: f32,
5380    #[doc = "Roll angle"]
5381    pub RollAngle: f32,
5382    #[doc = "Roll angle reference"]
5383    pub RollAngleRef: f32,
5384    pub p: f32,
5385    pub pRef: f32,
5386    pub r: f32,
5387    pub rRef: f32,
5388    pub uAil: f32,
5389    pub uRud: f32,
5390    #[doc = "ASLCTRL control-mode (manual, stabilized, auto, etc...)"]
5391    pub aslctrl_mode: u8,
5392    pub SpoilersEngaged: u8,
5393}
5394impl ASLCTRL_DATA_DATA {
5395    pub const ENCODED_LEN: usize = 98usize;
5396    pub const DEFAULT: Self = Self {
5397        timestamp: 0_u64,
5398        h: 0.0_f32,
5399        hRef: 0.0_f32,
5400        hRef_t: 0.0_f32,
5401        PitchAngle: 0.0_f32,
5402        PitchAngleRef: 0.0_f32,
5403        q: 0.0_f32,
5404        qRef: 0.0_f32,
5405        uElev: 0.0_f32,
5406        uThrot: 0.0_f32,
5407        uThrot2: 0.0_f32,
5408        nZ: 0.0_f32,
5409        AirspeedRef: 0.0_f32,
5410        YawAngle: 0.0_f32,
5411        YawAngleRef: 0.0_f32,
5412        RollAngle: 0.0_f32,
5413        RollAngleRef: 0.0_f32,
5414        p: 0.0_f32,
5415        pRef: 0.0_f32,
5416        r: 0.0_f32,
5417        rRef: 0.0_f32,
5418        uAil: 0.0_f32,
5419        uRud: 0.0_f32,
5420        aslctrl_mode: 0_u8,
5421        SpoilersEngaged: 0_u8,
5422    };
5423    #[cfg(feature = "arbitrary")]
5424    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5425        use arbitrary::{Arbitrary, Unstructured};
5426        let mut buf = [0u8; 1024];
5427        rng.fill_bytes(&mut buf);
5428        let mut unstructured = Unstructured::new(&buf);
5429        Self::arbitrary(&mut unstructured).unwrap_or_default()
5430    }
5431}
5432impl Default for ASLCTRL_DATA_DATA {
5433    fn default() -> Self {
5434        Self::DEFAULT.clone()
5435    }
5436}
5437impl MessageData for ASLCTRL_DATA_DATA {
5438    type Message = MavMessage;
5439    const ID: u32 = 8004u32;
5440    const NAME: &'static str = "ASLCTRL_DATA";
5441    const EXTRA_CRC: u8 = 172u8;
5442    const ENCODED_LEN: usize = 98usize;
5443    fn deser(
5444        _version: MavlinkVersion,
5445        __input: &[u8],
5446    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5447        let avail_len = __input.len();
5448        let mut payload_buf = [0; Self::ENCODED_LEN];
5449        let mut buf = if avail_len < Self::ENCODED_LEN {
5450            payload_buf[0..avail_len].copy_from_slice(__input);
5451            Bytes::new(&payload_buf)
5452        } else {
5453            Bytes::new(__input)
5454        };
5455        let mut __struct = Self::default();
5456        __struct.timestamp = buf.get_u64_le();
5457        __struct.h = buf.get_f32_le();
5458        __struct.hRef = buf.get_f32_le();
5459        __struct.hRef_t = buf.get_f32_le();
5460        __struct.PitchAngle = buf.get_f32_le();
5461        __struct.PitchAngleRef = buf.get_f32_le();
5462        __struct.q = buf.get_f32_le();
5463        __struct.qRef = buf.get_f32_le();
5464        __struct.uElev = buf.get_f32_le();
5465        __struct.uThrot = buf.get_f32_le();
5466        __struct.uThrot2 = buf.get_f32_le();
5467        __struct.nZ = buf.get_f32_le();
5468        __struct.AirspeedRef = buf.get_f32_le();
5469        __struct.YawAngle = buf.get_f32_le();
5470        __struct.YawAngleRef = buf.get_f32_le();
5471        __struct.RollAngle = buf.get_f32_le();
5472        __struct.RollAngleRef = buf.get_f32_le();
5473        __struct.p = buf.get_f32_le();
5474        __struct.pRef = buf.get_f32_le();
5475        __struct.r = buf.get_f32_le();
5476        __struct.rRef = buf.get_f32_le();
5477        __struct.uAil = buf.get_f32_le();
5478        __struct.uRud = buf.get_f32_le();
5479        __struct.aslctrl_mode = buf.get_u8();
5480        __struct.SpoilersEngaged = buf.get_u8();
5481        Ok(__struct)
5482    }
5483    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5484        let mut __tmp = BytesMut::new(bytes);
5485        #[allow(clippy::absurd_extreme_comparisons)]
5486        #[allow(unused_comparisons)]
5487        if __tmp.remaining() < Self::ENCODED_LEN {
5488            panic!(
5489                "buffer is too small (need {} bytes, but got {})",
5490                Self::ENCODED_LEN,
5491                __tmp.remaining(),
5492            )
5493        }
5494        __tmp.put_u64_le(self.timestamp);
5495        __tmp.put_f32_le(self.h);
5496        __tmp.put_f32_le(self.hRef);
5497        __tmp.put_f32_le(self.hRef_t);
5498        __tmp.put_f32_le(self.PitchAngle);
5499        __tmp.put_f32_le(self.PitchAngleRef);
5500        __tmp.put_f32_le(self.q);
5501        __tmp.put_f32_le(self.qRef);
5502        __tmp.put_f32_le(self.uElev);
5503        __tmp.put_f32_le(self.uThrot);
5504        __tmp.put_f32_le(self.uThrot2);
5505        __tmp.put_f32_le(self.nZ);
5506        __tmp.put_f32_le(self.AirspeedRef);
5507        __tmp.put_f32_le(self.YawAngle);
5508        __tmp.put_f32_le(self.YawAngleRef);
5509        __tmp.put_f32_le(self.RollAngle);
5510        __tmp.put_f32_le(self.RollAngleRef);
5511        __tmp.put_f32_le(self.p);
5512        __tmp.put_f32_le(self.pRef);
5513        __tmp.put_f32_le(self.r);
5514        __tmp.put_f32_le(self.rRef);
5515        __tmp.put_f32_le(self.uAil);
5516        __tmp.put_f32_le(self.uRud);
5517        __tmp.put_u8(self.aslctrl_mode);
5518        __tmp.put_u8(self.SpoilersEngaged);
5519        if matches!(version, MavlinkVersion::V2) {
5520            let len = __tmp.len();
5521            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5522        } else {
5523            __tmp.len()
5524        }
5525    }
5526}
5527#[doc = "ASL-fixed-wing controller debug data."]
5528#[doc = ""]
5529#[doc = "ID: 8005"]
5530#[derive(Debug, Clone, PartialEq)]
5531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5533#[cfg_attr(feature = "ts", derive(TS))]
5534#[cfg_attr(feature = "ts", ts(export))]
5535pub struct ASLCTRL_DEBUG_DATA {
5536    #[doc = "Debug data"]
5537    pub i32_1: u32,
5538    #[doc = "Debug data"]
5539    pub f_1: f32,
5540    #[doc = "Debug data"]
5541    pub f_2: f32,
5542    #[doc = "Debug data"]
5543    pub f_3: f32,
5544    #[doc = "Debug data"]
5545    pub f_4: f32,
5546    #[doc = "Debug data"]
5547    pub f_5: f32,
5548    #[doc = "Debug data"]
5549    pub f_6: f32,
5550    #[doc = "Debug data"]
5551    pub f_7: f32,
5552    #[doc = "Debug data"]
5553    pub f_8: f32,
5554    #[doc = "Debug data"]
5555    pub i8_1: u8,
5556    #[doc = "Debug data"]
5557    pub i8_2: u8,
5558}
5559impl ASLCTRL_DEBUG_DATA {
5560    pub const ENCODED_LEN: usize = 38usize;
5561    pub const DEFAULT: Self = Self {
5562        i32_1: 0_u32,
5563        f_1: 0.0_f32,
5564        f_2: 0.0_f32,
5565        f_3: 0.0_f32,
5566        f_4: 0.0_f32,
5567        f_5: 0.0_f32,
5568        f_6: 0.0_f32,
5569        f_7: 0.0_f32,
5570        f_8: 0.0_f32,
5571        i8_1: 0_u8,
5572        i8_2: 0_u8,
5573    };
5574    #[cfg(feature = "arbitrary")]
5575    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5576        use arbitrary::{Arbitrary, Unstructured};
5577        let mut buf = [0u8; 1024];
5578        rng.fill_bytes(&mut buf);
5579        let mut unstructured = Unstructured::new(&buf);
5580        Self::arbitrary(&mut unstructured).unwrap_or_default()
5581    }
5582}
5583impl Default for ASLCTRL_DEBUG_DATA {
5584    fn default() -> Self {
5585        Self::DEFAULT.clone()
5586    }
5587}
5588impl MessageData for ASLCTRL_DEBUG_DATA {
5589    type Message = MavMessage;
5590    const ID: u32 = 8005u32;
5591    const NAME: &'static str = "ASLCTRL_DEBUG";
5592    const EXTRA_CRC: u8 = 251u8;
5593    const ENCODED_LEN: usize = 38usize;
5594    fn deser(
5595        _version: MavlinkVersion,
5596        __input: &[u8],
5597    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5598        let avail_len = __input.len();
5599        let mut payload_buf = [0; Self::ENCODED_LEN];
5600        let mut buf = if avail_len < Self::ENCODED_LEN {
5601            payload_buf[0..avail_len].copy_from_slice(__input);
5602            Bytes::new(&payload_buf)
5603        } else {
5604            Bytes::new(__input)
5605        };
5606        let mut __struct = Self::default();
5607        __struct.i32_1 = buf.get_u32_le();
5608        __struct.f_1 = buf.get_f32_le();
5609        __struct.f_2 = buf.get_f32_le();
5610        __struct.f_3 = buf.get_f32_le();
5611        __struct.f_4 = buf.get_f32_le();
5612        __struct.f_5 = buf.get_f32_le();
5613        __struct.f_6 = buf.get_f32_le();
5614        __struct.f_7 = buf.get_f32_le();
5615        __struct.f_8 = buf.get_f32_le();
5616        __struct.i8_1 = buf.get_u8();
5617        __struct.i8_2 = buf.get_u8();
5618        Ok(__struct)
5619    }
5620    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5621        let mut __tmp = BytesMut::new(bytes);
5622        #[allow(clippy::absurd_extreme_comparisons)]
5623        #[allow(unused_comparisons)]
5624        if __tmp.remaining() < Self::ENCODED_LEN {
5625            panic!(
5626                "buffer is too small (need {} bytes, but got {})",
5627                Self::ENCODED_LEN,
5628                __tmp.remaining(),
5629            )
5630        }
5631        __tmp.put_u32_le(self.i32_1);
5632        __tmp.put_f32_le(self.f_1);
5633        __tmp.put_f32_le(self.f_2);
5634        __tmp.put_f32_le(self.f_3);
5635        __tmp.put_f32_le(self.f_4);
5636        __tmp.put_f32_le(self.f_5);
5637        __tmp.put_f32_le(self.f_6);
5638        __tmp.put_f32_le(self.f_7);
5639        __tmp.put_f32_le(self.f_8);
5640        __tmp.put_u8(self.i8_1);
5641        __tmp.put_u8(self.i8_2);
5642        if matches!(version, MavlinkVersion::V2) {
5643            let len = __tmp.len();
5644            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5645        } else {
5646            __tmp.len()
5647        }
5648    }
5649}
5650#[doc = "Extended state information for ASLUAVs."]
5651#[doc = ""]
5652#[doc = "ID: 8006"]
5653#[derive(Debug, Clone, PartialEq)]
5654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5656#[cfg_attr(feature = "ts", derive(TS))]
5657#[cfg_attr(feature = "ts", ts(export))]
5658pub struct ASLUAV_STATUS_DATA {
5659    #[doc = "Motor RPM"]
5660    pub Motor_rpm: f32,
5661    #[doc = "Status of the position-indicator LEDs"]
5662    pub LED_status: u8,
5663    #[doc = "Status of the IRIDIUM satellite communication system"]
5664    pub SATCOM_status: u8,
5665    #[doc = "Status vector for up to 8 servos"]
5666    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5667    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5668    pub Servo_status: [u8; 8],
5669}
5670impl ASLUAV_STATUS_DATA {
5671    pub const ENCODED_LEN: usize = 14usize;
5672    pub const DEFAULT: Self = Self {
5673        Motor_rpm: 0.0_f32,
5674        LED_status: 0_u8,
5675        SATCOM_status: 0_u8,
5676        Servo_status: [0_u8; 8usize],
5677    };
5678    #[cfg(feature = "arbitrary")]
5679    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5680        use arbitrary::{Arbitrary, Unstructured};
5681        let mut buf = [0u8; 1024];
5682        rng.fill_bytes(&mut buf);
5683        let mut unstructured = Unstructured::new(&buf);
5684        Self::arbitrary(&mut unstructured).unwrap_or_default()
5685    }
5686}
5687impl Default for ASLUAV_STATUS_DATA {
5688    fn default() -> Self {
5689        Self::DEFAULT.clone()
5690    }
5691}
5692impl MessageData for ASLUAV_STATUS_DATA {
5693    type Message = MavMessage;
5694    const ID: u32 = 8006u32;
5695    const NAME: &'static str = "ASLUAV_STATUS";
5696    const EXTRA_CRC: u8 = 97u8;
5697    const ENCODED_LEN: usize = 14usize;
5698    fn deser(
5699        _version: MavlinkVersion,
5700        __input: &[u8],
5701    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5702        let avail_len = __input.len();
5703        let mut payload_buf = [0; Self::ENCODED_LEN];
5704        let mut buf = if avail_len < Self::ENCODED_LEN {
5705            payload_buf[0..avail_len].copy_from_slice(__input);
5706            Bytes::new(&payload_buf)
5707        } else {
5708            Bytes::new(__input)
5709        };
5710        let mut __struct = Self::default();
5711        __struct.Motor_rpm = buf.get_f32_le();
5712        __struct.LED_status = buf.get_u8();
5713        __struct.SATCOM_status = buf.get_u8();
5714        for v in &mut __struct.Servo_status {
5715            let val = buf.get_u8();
5716            *v = val;
5717        }
5718        Ok(__struct)
5719    }
5720    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5721        let mut __tmp = BytesMut::new(bytes);
5722        #[allow(clippy::absurd_extreme_comparisons)]
5723        #[allow(unused_comparisons)]
5724        if __tmp.remaining() < Self::ENCODED_LEN {
5725            panic!(
5726                "buffer is too small (need {} bytes, but got {})",
5727                Self::ENCODED_LEN,
5728                __tmp.remaining(),
5729            )
5730        }
5731        __tmp.put_f32_le(self.Motor_rpm);
5732        __tmp.put_u8(self.LED_status);
5733        __tmp.put_u8(self.SATCOM_status);
5734        for val in &self.Servo_status {
5735            __tmp.put_u8(*val);
5736        }
5737        if matches!(version, MavlinkVersion::V2) {
5738            let len = __tmp.len();
5739            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5740        } else {
5741            __tmp.len()
5742        }
5743    }
5744}
5745#[doc = "Off-board controls/commands for ASLUAVs."]
5746#[doc = ""]
5747#[doc = "ID: 8008"]
5748#[derive(Debug, Clone, PartialEq)]
5749#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5751#[cfg_attr(feature = "ts", derive(TS))]
5752#[cfg_attr(feature = "ts", ts(export))]
5753pub struct ASL_OBCTRL_DATA {
5754    #[doc = "Time since system start"]
5755    pub timestamp: u64,
5756    #[doc = "Elevator command [~]"]
5757    pub uElev: f32,
5758    #[doc = "Throttle command [~]"]
5759    pub uThrot: f32,
5760    #[doc = "Throttle 2 command [~]"]
5761    pub uThrot2: f32,
5762    #[doc = "Left aileron command [~]"]
5763    pub uAilL: f32,
5764    #[doc = "Right aileron command [~]"]
5765    pub uAilR: f32,
5766    #[doc = "Rudder command [~]"]
5767    pub uRud: f32,
5768    #[doc = "Off-board computer status"]
5769    pub obctrl_status: u8,
5770}
5771impl ASL_OBCTRL_DATA {
5772    pub const ENCODED_LEN: usize = 33usize;
5773    pub const DEFAULT: Self = Self {
5774        timestamp: 0_u64,
5775        uElev: 0.0_f32,
5776        uThrot: 0.0_f32,
5777        uThrot2: 0.0_f32,
5778        uAilL: 0.0_f32,
5779        uAilR: 0.0_f32,
5780        uRud: 0.0_f32,
5781        obctrl_status: 0_u8,
5782    };
5783    #[cfg(feature = "arbitrary")]
5784    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5785        use arbitrary::{Arbitrary, Unstructured};
5786        let mut buf = [0u8; 1024];
5787        rng.fill_bytes(&mut buf);
5788        let mut unstructured = Unstructured::new(&buf);
5789        Self::arbitrary(&mut unstructured).unwrap_or_default()
5790    }
5791}
5792impl Default for ASL_OBCTRL_DATA {
5793    fn default() -> Self {
5794        Self::DEFAULT.clone()
5795    }
5796}
5797impl MessageData for ASL_OBCTRL_DATA {
5798    type Message = MavMessage;
5799    const ID: u32 = 8008u32;
5800    const NAME: &'static str = "ASL_OBCTRL";
5801    const EXTRA_CRC: u8 = 234u8;
5802    const ENCODED_LEN: usize = 33usize;
5803    fn deser(
5804        _version: MavlinkVersion,
5805        __input: &[u8],
5806    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5807        let avail_len = __input.len();
5808        let mut payload_buf = [0; Self::ENCODED_LEN];
5809        let mut buf = if avail_len < Self::ENCODED_LEN {
5810            payload_buf[0..avail_len].copy_from_slice(__input);
5811            Bytes::new(&payload_buf)
5812        } else {
5813            Bytes::new(__input)
5814        };
5815        let mut __struct = Self::default();
5816        __struct.timestamp = buf.get_u64_le();
5817        __struct.uElev = buf.get_f32_le();
5818        __struct.uThrot = buf.get_f32_le();
5819        __struct.uThrot2 = buf.get_f32_le();
5820        __struct.uAilL = buf.get_f32_le();
5821        __struct.uAilR = buf.get_f32_le();
5822        __struct.uRud = buf.get_f32_le();
5823        __struct.obctrl_status = buf.get_u8();
5824        Ok(__struct)
5825    }
5826    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5827        let mut __tmp = BytesMut::new(bytes);
5828        #[allow(clippy::absurd_extreme_comparisons)]
5829        #[allow(unused_comparisons)]
5830        if __tmp.remaining() < Self::ENCODED_LEN {
5831            panic!(
5832                "buffer is too small (need {} bytes, but got {})",
5833                Self::ENCODED_LEN,
5834                __tmp.remaining(),
5835            )
5836        }
5837        __tmp.put_u64_le(self.timestamp);
5838        __tmp.put_f32_le(self.uElev);
5839        __tmp.put_f32_le(self.uThrot);
5840        __tmp.put_f32_le(self.uThrot2);
5841        __tmp.put_f32_le(self.uAilL);
5842        __tmp.put_f32_le(self.uAilR);
5843        __tmp.put_f32_le(self.uRud);
5844        __tmp.put_u8(self.obctrl_status);
5845        if matches!(version, MavlinkVersion::V2) {
5846            let len = __tmp.len();
5847            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5848        } else {
5849            __tmp.len()
5850        }
5851    }
5852}
5853#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5854#[doc = ""]
5855#[doc = "ID: 30"]
5856#[derive(Debug, Clone, PartialEq)]
5857#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5859#[cfg_attr(feature = "ts", derive(TS))]
5860#[cfg_attr(feature = "ts", ts(export))]
5861pub struct ATTITUDE_DATA {
5862    #[doc = "Timestamp (time since system boot)."]
5863    pub time_boot_ms: u32,
5864    #[doc = "Roll angle (-pi..+pi)"]
5865    pub roll: f32,
5866    #[doc = "Pitch angle (-pi..+pi)"]
5867    pub pitch: f32,
5868    #[doc = "Yaw angle (-pi..+pi)"]
5869    pub yaw: f32,
5870    #[doc = "Roll angular speed"]
5871    pub rollspeed: f32,
5872    #[doc = "Pitch angular speed"]
5873    pub pitchspeed: f32,
5874    #[doc = "Yaw angular speed"]
5875    pub yawspeed: f32,
5876}
5877impl ATTITUDE_DATA {
5878    pub const ENCODED_LEN: usize = 28usize;
5879    pub const DEFAULT: Self = Self {
5880        time_boot_ms: 0_u32,
5881        roll: 0.0_f32,
5882        pitch: 0.0_f32,
5883        yaw: 0.0_f32,
5884        rollspeed: 0.0_f32,
5885        pitchspeed: 0.0_f32,
5886        yawspeed: 0.0_f32,
5887    };
5888    #[cfg(feature = "arbitrary")]
5889    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5890        use arbitrary::{Arbitrary, Unstructured};
5891        let mut buf = [0u8; 1024];
5892        rng.fill_bytes(&mut buf);
5893        let mut unstructured = Unstructured::new(&buf);
5894        Self::arbitrary(&mut unstructured).unwrap_or_default()
5895    }
5896}
5897impl Default for ATTITUDE_DATA {
5898    fn default() -> Self {
5899        Self::DEFAULT.clone()
5900    }
5901}
5902impl MessageData for ATTITUDE_DATA {
5903    type Message = MavMessage;
5904    const ID: u32 = 30u32;
5905    const NAME: &'static str = "ATTITUDE";
5906    const EXTRA_CRC: u8 = 39u8;
5907    const ENCODED_LEN: usize = 28usize;
5908    fn deser(
5909        _version: MavlinkVersion,
5910        __input: &[u8],
5911    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5912        let avail_len = __input.len();
5913        let mut payload_buf = [0; Self::ENCODED_LEN];
5914        let mut buf = if avail_len < Self::ENCODED_LEN {
5915            payload_buf[0..avail_len].copy_from_slice(__input);
5916            Bytes::new(&payload_buf)
5917        } else {
5918            Bytes::new(__input)
5919        };
5920        let mut __struct = Self::default();
5921        __struct.time_boot_ms = buf.get_u32_le();
5922        __struct.roll = buf.get_f32_le();
5923        __struct.pitch = buf.get_f32_le();
5924        __struct.yaw = buf.get_f32_le();
5925        __struct.rollspeed = buf.get_f32_le();
5926        __struct.pitchspeed = buf.get_f32_le();
5927        __struct.yawspeed = buf.get_f32_le();
5928        Ok(__struct)
5929    }
5930    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5931        let mut __tmp = BytesMut::new(bytes);
5932        #[allow(clippy::absurd_extreme_comparisons)]
5933        #[allow(unused_comparisons)]
5934        if __tmp.remaining() < Self::ENCODED_LEN {
5935            panic!(
5936                "buffer is too small (need {} bytes, but got {})",
5937                Self::ENCODED_LEN,
5938                __tmp.remaining(),
5939            )
5940        }
5941        __tmp.put_u32_le(self.time_boot_ms);
5942        __tmp.put_f32_le(self.roll);
5943        __tmp.put_f32_le(self.pitch);
5944        __tmp.put_f32_le(self.yaw);
5945        __tmp.put_f32_le(self.rollspeed);
5946        __tmp.put_f32_le(self.pitchspeed);
5947        __tmp.put_f32_le(self.yawspeed);
5948        if matches!(version, MavlinkVersion::V2) {
5949            let len = __tmp.len();
5950            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5951        } else {
5952            __tmp.len()
5953        }
5954    }
5955}
5956#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5957#[doc = ""]
5958#[doc = "ID: 31"]
5959#[derive(Debug, Clone, PartialEq)]
5960#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5961#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5962#[cfg_attr(feature = "ts", derive(TS))]
5963#[cfg_attr(feature = "ts", ts(export))]
5964pub struct ATTITUDE_QUATERNION_DATA {
5965    #[doc = "Timestamp (time since system boot)."]
5966    pub time_boot_ms: u32,
5967    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5968    pub q1: f32,
5969    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5970    pub q2: f32,
5971    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5972    pub q3: f32,
5973    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5974    pub q4: f32,
5975    #[doc = "Roll angular speed"]
5976    pub rollspeed: f32,
5977    #[doc = "Pitch angular speed"]
5978    pub pitchspeed: f32,
5979    #[doc = "Yaw angular speed"]
5980    pub yawspeed: f32,
5981    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5982    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5983    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5984    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5985    pub repr_offset_q: [f32; 4],
5986}
5987impl ATTITUDE_QUATERNION_DATA {
5988    pub const ENCODED_LEN: usize = 48usize;
5989    pub const DEFAULT: Self = Self {
5990        time_boot_ms: 0_u32,
5991        q1: 0.0_f32,
5992        q2: 0.0_f32,
5993        q3: 0.0_f32,
5994        q4: 0.0_f32,
5995        rollspeed: 0.0_f32,
5996        pitchspeed: 0.0_f32,
5997        yawspeed: 0.0_f32,
5998        repr_offset_q: [0.0_f32; 4usize],
5999    };
6000    #[cfg(feature = "arbitrary")]
6001    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6002        use arbitrary::{Arbitrary, Unstructured};
6003        let mut buf = [0u8; 1024];
6004        rng.fill_bytes(&mut buf);
6005        let mut unstructured = Unstructured::new(&buf);
6006        Self::arbitrary(&mut unstructured).unwrap_or_default()
6007    }
6008}
6009impl Default for ATTITUDE_QUATERNION_DATA {
6010    fn default() -> Self {
6011        Self::DEFAULT.clone()
6012    }
6013}
6014impl MessageData for ATTITUDE_QUATERNION_DATA {
6015    type Message = MavMessage;
6016    const ID: u32 = 31u32;
6017    const NAME: &'static str = "ATTITUDE_QUATERNION";
6018    const EXTRA_CRC: u8 = 246u8;
6019    const ENCODED_LEN: usize = 48usize;
6020    fn deser(
6021        _version: MavlinkVersion,
6022        __input: &[u8],
6023    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6024        let avail_len = __input.len();
6025        let mut payload_buf = [0; Self::ENCODED_LEN];
6026        let mut buf = if avail_len < Self::ENCODED_LEN {
6027            payload_buf[0..avail_len].copy_from_slice(__input);
6028            Bytes::new(&payload_buf)
6029        } else {
6030            Bytes::new(__input)
6031        };
6032        let mut __struct = Self::default();
6033        __struct.time_boot_ms = buf.get_u32_le();
6034        __struct.q1 = buf.get_f32_le();
6035        __struct.q2 = buf.get_f32_le();
6036        __struct.q3 = buf.get_f32_le();
6037        __struct.q4 = buf.get_f32_le();
6038        __struct.rollspeed = buf.get_f32_le();
6039        __struct.pitchspeed = buf.get_f32_le();
6040        __struct.yawspeed = buf.get_f32_le();
6041        for v in &mut __struct.repr_offset_q {
6042            let val = buf.get_f32_le();
6043            *v = val;
6044        }
6045        Ok(__struct)
6046    }
6047    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6048        let mut __tmp = BytesMut::new(bytes);
6049        #[allow(clippy::absurd_extreme_comparisons)]
6050        #[allow(unused_comparisons)]
6051        if __tmp.remaining() < Self::ENCODED_LEN {
6052            panic!(
6053                "buffer is too small (need {} bytes, but got {})",
6054                Self::ENCODED_LEN,
6055                __tmp.remaining(),
6056            )
6057        }
6058        __tmp.put_u32_le(self.time_boot_ms);
6059        __tmp.put_f32_le(self.q1);
6060        __tmp.put_f32_le(self.q2);
6061        __tmp.put_f32_le(self.q3);
6062        __tmp.put_f32_le(self.q4);
6063        __tmp.put_f32_le(self.rollspeed);
6064        __tmp.put_f32_le(self.pitchspeed);
6065        __tmp.put_f32_le(self.yawspeed);
6066        if matches!(version, MavlinkVersion::V2) {
6067            for val in &self.repr_offset_q {
6068                __tmp.put_f32_le(*val);
6069            }
6070            let len = __tmp.len();
6071            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6072        } else {
6073            __tmp.len()
6074        }
6075    }
6076}
6077#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
6078#[doc = ""]
6079#[doc = "ID: 61"]
6080#[derive(Debug, Clone, PartialEq)]
6081#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6082#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6083#[cfg_attr(feature = "ts", derive(TS))]
6084#[cfg_attr(feature = "ts", ts(export))]
6085pub struct ATTITUDE_QUATERNION_COV_DATA {
6086    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6087    pub time_usec: u64,
6088    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
6089    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6090    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6091    pub q: [f32; 4],
6092    #[doc = "Roll angular speed"]
6093    pub rollspeed: f32,
6094    #[doc = "Pitch angular speed"]
6095    pub pitchspeed: f32,
6096    #[doc = "Yaw angular speed"]
6097    pub yawspeed: f32,
6098    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
6099    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6100    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6101    pub covariance: [f32; 9],
6102}
6103impl ATTITUDE_QUATERNION_COV_DATA {
6104    pub const ENCODED_LEN: usize = 72usize;
6105    pub const DEFAULT: Self = Self {
6106        time_usec: 0_u64,
6107        q: [0.0_f32; 4usize],
6108        rollspeed: 0.0_f32,
6109        pitchspeed: 0.0_f32,
6110        yawspeed: 0.0_f32,
6111        covariance: [0.0_f32; 9usize],
6112    };
6113    #[cfg(feature = "arbitrary")]
6114    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6115        use arbitrary::{Arbitrary, Unstructured};
6116        let mut buf = [0u8; 1024];
6117        rng.fill_bytes(&mut buf);
6118        let mut unstructured = Unstructured::new(&buf);
6119        Self::arbitrary(&mut unstructured).unwrap_or_default()
6120    }
6121}
6122impl Default for ATTITUDE_QUATERNION_COV_DATA {
6123    fn default() -> Self {
6124        Self::DEFAULT.clone()
6125    }
6126}
6127impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
6128    type Message = MavMessage;
6129    const ID: u32 = 61u32;
6130    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
6131    const EXTRA_CRC: u8 = 167u8;
6132    const ENCODED_LEN: usize = 72usize;
6133    fn deser(
6134        _version: MavlinkVersion,
6135        __input: &[u8],
6136    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6137        let avail_len = __input.len();
6138        let mut payload_buf = [0; Self::ENCODED_LEN];
6139        let mut buf = if avail_len < Self::ENCODED_LEN {
6140            payload_buf[0..avail_len].copy_from_slice(__input);
6141            Bytes::new(&payload_buf)
6142        } else {
6143            Bytes::new(__input)
6144        };
6145        let mut __struct = Self::default();
6146        __struct.time_usec = buf.get_u64_le();
6147        for v in &mut __struct.q {
6148            let val = buf.get_f32_le();
6149            *v = val;
6150        }
6151        __struct.rollspeed = buf.get_f32_le();
6152        __struct.pitchspeed = buf.get_f32_le();
6153        __struct.yawspeed = buf.get_f32_le();
6154        for v in &mut __struct.covariance {
6155            let val = buf.get_f32_le();
6156            *v = val;
6157        }
6158        Ok(__struct)
6159    }
6160    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6161        let mut __tmp = BytesMut::new(bytes);
6162        #[allow(clippy::absurd_extreme_comparisons)]
6163        #[allow(unused_comparisons)]
6164        if __tmp.remaining() < Self::ENCODED_LEN {
6165            panic!(
6166                "buffer is too small (need {} bytes, but got {})",
6167                Self::ENCODED_LEN,
6168                __tmp.remaining(),
6169            )
6170        }
6171        __tmp.put_u64_le(self.time_usec);
6172        for val in &self.q {
6173            __tmp.put_f32_le(*val);
6174        }
6175        __tmp.put_f32_le(self.rollspeed);
6176        __tmp.put_f32_le(self.pitchspeed);
6177        __tmp.put_f32_le(self.yawspeed);
6178        for val in &self.covariance {
6179            __tmp.put_f32_le(*val);
6180        }
6181        if matches!(version, MavlinkVersion::V2) {
6182            let len = __tmp.len();
6183            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6184        } else {
6185            __tmp.len()
6186        }
6187    }
6188}
6189#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
6190#[doc = ""]
6191#[doc = "ID: 83"]
6192#[derive(Debug, Clone, PartialEq)]
6193#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6194#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6195#[cfg_attr(feature = "ts", derive(TS))]
6196#[cfg_attr(feature = "ts", ts(export))]
6197pub struct ATTITUDE_TARGET_DATA {
6198    #[doc = "Timestamp (time since system boot)."]
6199    pub time_boot_ms: u32,
6200    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6201    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6202    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6203    pub q: [f32; 4],
6204    #[doc = "Body roll rate"]
6205    pub body_roll_rate: f32,
6206    #[doc = "Body pitch rate"]
6207    pub body_pitch_rate: f32,
6208    #[doc = "Body yaw rate"]
6209    pub body_yaw_rate: f32,
6210    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
6211    pub thrust: f32,
6212    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
6213    pub type_mask: AttitudeTargetTypemask,
6214}
6215impl ATTITUDE_TARGET_DATA {
6216    pub const ENCODED_LEN: usize = 37usize;
6217    pub const DEFAULT: Self = Self {
6218        time_boot_ms: 0_u32,
6219        q: [0.0_f32; 4usize],
6220        body_roll_rate: 0.0_f32,
6221        body_pitch_rate: 0.0_f32,
6222        body_yaw_rate: 0.0_f32,
6223        thrust: 0.0_f32,
6224        type_mask: AttitudeTargetTypemask::DEFAULT,
6225    };
6226    #[cfg(feature = "arbitrary")]
6227    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6228        use arbitrary::{Arbitrary, Unstructured};
6229        let mut buf = [0u8; 1024];
6230        rng.fill_bytes(&mut buf);
6231        let mut unstructured = Unstructured::new(&buf);
6232        Self::arbitrary(&mut unstructured).unwrap_or_default()
6233    }
6234}
6235impl Default for ATTITUDE_TARGET_DATA {
6236    fn default() -> Self {
6237        Self::DEFAULT.clone()
6238    }
6239}
6240impl MessageData for ATTITUDE_TARGET_DATA {
6241    type Message = MavMessage;
6242    const ID: u32 = 83u32;
6243    const NAME: &'static str = "ATTITUDE_TARGET";
6244    const EXTRA_CRC: u8 = 22u8;
6245    const ENCODED_LEN: usize = 37usize;
6246    fn deser(
6247        _version: MavlinkVersion,
6248        __input: &[u8],
6249    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6250        let avail_len = __input.len();
6251        let mut payload_buf = [0; Self::ENCODED_LEN];
6252        let mut buf = if avail_len < Self::ENCODED_LEN {
6253            payload_buf[0..avail_len].copy_from_slice(__input);
6254            Bytes::new(&payload_buf)
6255        } else {
6256            Bytes::new(__input)
6257        };
6258        let mut __struct = Self::default();
6259        __struct.time_boot_ms = buf.get_u32_le();
6260        for v in &mut __struct.q {
6261            let val = buf.get_f32_le();
6262            *v = val;
6263        }
6264        __struct.body_roll_rate = buf.get_f32_le();
6265        __struct.body_pitch_rate = buf.get_f32_le();
6266        __struct.body_yaw_rate = buf.get_f32_le();
6267        __struct.thrust = buf.get_f32_le();
6268        let tmp = buf.get_u8();
6269        __struct.type_mask =
6270            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
6271                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6272                    flag_type: "AttitudeTargetTypemask",
6273                    value: tmp as u64,
6274                })?;
6275        Ok(__struct)
6276    }
6277    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6278        let mut __tmp = BytesMut::new(bytes);
6279        #[allow(clippy::absurd_extreme_comparisons)]
6280        #[allow(unused_comparisons)]
6281        if __tmp.remaining() < Self::ENCODED_LEN {
6282            panic!(
6283                "buffer is too small (need {} bytes, but got {})",
6284                Self::ENCODED_LEN,
6285                __tmp.remaining(),
6286            )
6287        }
6288        __tmp.put_u32_le(self.time_boot_ms);
6289        for val in &self.q {
6290            __tmp.put_f32_le(*val);
6291        }
6292        __tmp.put_f32_le(self.body_roll_rate);
6293        __tmp.put_f32_le(self.body_pitch_rate);
6294        __tmp.put_f32_le(self.body_yaw_rate);
6295        __tmp.put_f32_le(self.thrust);
6296        __tmp.put_u8(self.type_mask.bits() as u8);
6297        if matches!(version, MavlinkVersion::V2) {
6298            let len = __tmp.len();
6299            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6300        } else {
6301            __tmp.len()
6302        }
6303    }
6304}
6305#[doc = "Motion capture attitude and position."]
6306#[doc = ""]
6307#[doc = "ID: 138"]
6308#[derive(Debug, Clone, PartialEq)]
6309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6310#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6311#[cfg_attr(feature = "ts", derive(TS))]
6312#[cfg_attr(feature = "ts", ts(export))]
6313pub struct ATT_POS_MOCAP_DATA {
6314    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6315    pub time_usec: u64,
6316    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6317    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6318    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6319    pub q: [f32; 4],
6320    #[doc = "X position (NED)"]
6321    pub x: f32,
6322    #[doc = "Y position (NED)"]
6323    pub y: f32,
6324    #[doc = "Z position (NED)"]
6325    pub z: f32,
6326    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
6327    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6328    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6329    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6330    pub covariance: [f32; 21],
6331}
6332impl ATT_POS_MOCAP_DATA {
6333    pub const ENCODED_LEN: usize = 120usize;
6334    pub const DEFAULT: Self = Self {
6335        time_usec: 0_u64,
6336        q: [0.0_f32; 4usize],
6337        x: 0.0_f32,
6338        y: 0.0_f32,
6339        z: 0.0_f32,
6340        covariance: [0.0_f32; 21usize],
6341    };
6342    #[cfg(feature = "arbitrary")]
6343    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6344        use arbitrary::{Arbitrary, Unstructured};
6345        let mut buf = [0u8; 1024];
6346        rng.fill_bytes(&mut buf);
6347        let mut unstructured = Unstructured::new(&buf);
6348        Self::arbitrary(&mut unstructured).unwrap_or_default()
6349    }
6350}
6351impl Default for ATT_POS_MOCAP_DATA {
6352    fn default() -> Self {
6353        Self::DEFAULT.clone()
6354    }
6355}
6356impl MessageData for ATT_POS_MOCAP_DATA {
6357    type Message = MavMessage;
6358    const ID: u32 = 138u32;
6359    const NAME: &'static str = "ATT_POS_MOCAP";
6360    const EXTRA_CRC: u8 = 109u8;
6361    const ENCODED_LEN: usize = 120usize;
6362    fn deser(
6363        _version: MavlinkVersion,
6364        __input: &[u8],
6365    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6366        let avail_len = __input.len();
6367        let mut payload_buf = [0; Self::ENCODED_LEN];
6368        let mut buf = if avail_len < Self::ENCODED_LEN {
6369            payload_buf[0..avail_len].copy_from_slice(__input);
6370            Bytes::new(&payload_buf)
6371        } else {
6372            Bytes::new(__input)
6373        };
6374        let mut __struct = Self::default();
6375        __struct.time_usec = buf.get_u64_le();
6376        for v in &mut __struct.q {
6377            let val = buf.get_f32_le();
6378            *v = val;
6379        }
6380        __struct.x = buf.get_f32_le();
6381        __struct.y = buf.get_f32_le();
6382        __struct.z = buf.get_f32_le();
6383        for v in &mut __struct.covariance {
6384            let val = buf.get_f32_le();
6385            *v = val;
6386        }
6387        Ok(__struct)
6388    }
6389    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6390        let mut __tmp = BytesMut::new(bytes);
6391        #[allow(clippy::absurd_extreme_comparisons)]
6392        #[allow(unused_comparisons)]
6393        if __tmp.remaining() < Self::ENCODED_LEN {
6394            panic!(
6395                "buffer is too small (need {} bytes, but got {})",
6396                Self::ENCODED_LEN,
6397                __tmp.remaining(),
6398            )
6399        }
6400        __tmp.put_u64_le(self.time_usec);
6401        for val in &self.q {
6402            __tmp.put_f32_le(*val);
6403        }
6404        __tmp.put_f32_le(self.x);
6405        __tmp.put_f32_le(self.y);
6406        __tmp.put_f32_le(self.z);
6407        if matches!(version, MavlinkVersion::V2) {
6408            for val in &self.covariance {
6409                __tmp.put_f32_le(*val);
6410            }
6411            let len = __tmp.len();
6412            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6413        } else {
6414            __tmp.len()
6415        }
6416    }
6417}
6418#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
6419#[doc = ""]
6420#[doc = "ID: 7"]
6421#[derive(Debug, Clone, PartialEq)]
6422#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6424#[cfg_attr(feature = "ts", derive(TS))]
6425#[cfg_attr(feature = "ts", ts(export))]
6426pub struct AUTH_KEY_DATA {
6427    #[doc = "key"]
6428    #[cfg_attr(feature = "ts", ts(type = "string"))]
6429    pub key: CharArray<32>,
6430}
6431impl AUTH_KEY_DATA {
6432    pub const ENCODED_LEN: usize = 32usize;
6433    pub const DEFAULT: Self = Self {
6434        key: CharArray::new([0_u8; 32usize]),
6435    };
6436    #[cfg(feature = "arbitrary")]
6437    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6438        use arbitrary::{Arbitrary, Unstructured};
6439        let mut buf = [0u8; 1024];
6440        rng.fill_bytes(&mut buf);
6441        let mut unstructured = Unstructured::new(&buf);
6442        Self::arbitrary(&mut unstructured).unwrap_or_default()
6443    }
6444}
6445impl Default for AUTH_KEY_DATA {
6446    fn default() -> Self {
6447        Self::DEFAULT.clone()
6448    }
6449}
6450impl MessageData for AUTH_KEY_DATA {
6451    type Message = MavMessage;
6452    const ID: u32 = 7u32;
6453    const NAME: &'static str = "AUTH_KEY";
6454    const EXTRA_CRC: u8 = 119u8;
6455    const ENCODED_LEN: usize = 32usize;
6456    fn deser(
6457        _version: MavlinkVersion,
6458        __input: &[u8],
6459    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6460        let avail_len = __input.len();
6461        let mut payload_buf = [0; Self::ENCODED_LEN];
6462        let mut buf = if avail_len < Self::ENCODED_LEN {
6463            payload_buf[0..avail_len].copy_from_slice(__input);
6464            Bytes::new(&payload_buf)
6465        } else {
6466            Bytes::new(__input)
6467        };
6468        let mut __struct = Self::default();
6469        let mut tmp = [0_u8; 32usize];
6470        for v in &mut tmp {
6471            *v = buf.get_u8();
6472        }
6473        __struct.key = CharArray::new(tmp);
6474        Ok(__struct)
6475    }
6476    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6477        let mut __tmp = BytesMut::new(bytes);
6478        #[allow(clippy::absurd_extreme_comparisons)]
6479        #[allow(unused_comparisons)]
6480        if __tmp.remaining() < Self::ENCODED_LEN {
6481            panic!(
6482                "buffer is too small (need {} bytes, but got {})",
6483                Self::ENCODED_LEN,
6484                __tmp.remaining(),
6485            )
6486        }
6487        for val in &self.key {
6488            __tmp.put_u8(*val);
6489        }
6490        if matches!(version, MavlinkVersion::V2) {
6491            let len = __tmp.len();
6492            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6493        } else {
6494            __tmp.len()
6495        }
6496    }
6497}
6498#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6499#[doc = ""]
6500#[doc = "ID: 286"]
6501#[derive(Debug, Clone, PartialEq)]
6502#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6503#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6504#[cfg_attr(feature = "ts", derive(TS))]
6505#[cfg_attr(feature = "ts", ts(export))]
6506pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6507    #[doc = "Timestamp (time since system boot)."]
6508    pub time_boot_us: u64,
6509    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6510    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6511    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6512    pub q: [f32; 4],
6513    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6514    pub q_estimated_delay_us: u32,
6515    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6516    pub vx: f32,
6517    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6518    pub vy: f32,
6519    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6520    pub vz: f32,
6521    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6522    pub v_estimated_delay_us: u32,
6523    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6524    pub feed_forward_angular_velocity_z: f32,
6525    #[doc = "Bitmap indicating which estimator outputs are valid."]
6526    pub estimator_status: EstimatorStatusFlags,
6527    #[doc = "System ID"]
6528    pub target_system: u8,
6529    #[doc = "Component ID"]
6530    pub target_component: u8,
6531    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6532    pub landed_state: MavLandedState,
6533    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6534    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6535    pub angular_velocity_z: f32,
6536}
6537impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6538    pub const ENCODED_LEN: usize = 57usize;
6539    pub const DEFAULT: Self = Self {
6540        time_boot_us: 0_u64,
6541        q: [0.0_f32; 4usize],
6542        q_estimated_delay_us: 0_u32,
6543        vx: 0.0_f32,
6544        vy: 0.0_f32,
6545        vz: 0.0_f32,
6546        v_estimated_delay_us: 0_u32,
6547        feed_forward_angular_velocity_z: 0.0_f32,
6548        estimator_status: EstimatorStatusFlags::DEFAULT,
6549        target_system: 0_u8,
6550        target_component: 0_u8,
6551        landed_state: MavLandedState::DEFAULT,
6552        angular_velocity_z: 0.0_f32,
6553    };
6554    #[cfg(feature = "arbitrary")]
6555    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6556        use arbitrary::{Arbitrary, Unstructured};
6557        let mut buf = [0u8; 1024];
6558        rng.fill_bytes(&mut buf);
6559        let mut unstructured = Unstructured::new(&buf);
6560        Self::arbitrary(&mut unstructured).unwrap_or_default()
6561    }
6562}
6563impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6564    fn default() -> Self {
6565        Self::DEFAULT.clone()
6566    }
6567}
6568impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6569    type Message = MavMessage;
6570    const ID: u32 = 286u32;
6571    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6572    const EXTRA_CRC: u8 = 210u8;
6573    const ENCODED_LEN: usize = 57usize;
6574    fn deser(
6575        _version: MavlinkVersion,
6576        __input: &[u8],
6577    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6578        let avail_len = __input.len();
6579        let mut payload_buf = [0; Self::ENCODED_LEN];
6580        let mut buf = if avail_len < Self::ENCODED_LEN {
6581            payload_buf[0..avail_len].copy_from_slice(__input);
6582            Bytes::new(&payload_buf)
6583        } else {
6584            Bytes::new(__input)
6585        };
6586        let mut __struct = Self::default();
6587        __struct.time_boot_us = buf.get_u64_le();
6588        for v in &mut __struct.q {
6589            let val = buf.get_f32_le();
6590            *v = val;
6591        }
6592        __struct.q_estimated_delay_us = buf.get_u32_le();
6593        __struct.vx = buf.get_f32_le();
6594        __struct.vy = buf.get_f32_le();
6595        __struct.vz = buf.get_f32_le();
6596        __struct.v_estimated_delay_us = buf.get_u32_le();
6597        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6598        let tmp = buf.get_u16_le();
6599        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6600            tmp as <EstimatorStatusFlags as Flags>::Bits,
6601        )
6602        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6603            flag_type: "EstimatorStatusFlags",
6604            value: tmp as u64,
6605        })?;
6606        __struct.target_system = buf.get_u8();
6607        __struct.target_component = buf.get_u8();
6608        let tmp = buf.get_u8();
6609        __struct.landed_state =
6610            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6611                enum_type: "MavLandedState",
6612                value: tmp as u64,
6613            })?;
6614        __struct.angular_velocity_z = buf.get_f32_le();
6615        Ok(__struct)
6616    }
6617    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6618        let mut __tmp = BytesMut::new(bytes);
6619        #[allow(clippy::absurd_extreme_comparisons)]
6620        #[allow(unused_comparisons)]
6621        if __tmp.remaining() < Self::ENCODED_LEN {
6622            panic!(
6623                "buffer is too small (need {} bytes, but got {})",
6624                Self::ENCODED_LEN,
6625                __tmp.remaining(),
6626            )
6627        }
6628        __tmp.put_u64_le(self.time_boot_us);
6629        for val in &self.q {
6630            __tmp.put_f32_le(*val);
6631        }
6632        __tmp.put_u32_le(self.q_estimated_delay_us);
6633        __tmp.put_f32_le(self.vx);
6634        __tmp.put_f32_le(self.vy);
6635        __tmp.put_f32_le(self.vz);
6636        __tmp.put_u32_le(self.v_estimated_delay_us);
6637        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6638        __tmp.put_u16_le(self.estimator_status.bits() as u16);
6639        __tmp.put_u8(self.target_system);
6640        __tmp.put_u8(self.target_component);
6641        __tmp.put_u8(self.landed_state as u8);
6642        if matches!(version, MavlinkVersion::V2) {
6643            __tmp.put_f32_le(self.angular_velocity_z);
6644            let len = __tmp.len();
6645            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6646        } else {
6647            __tmp.len()
6648        }
6649    }
6650}
6651#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6652#[doc = ""]
6653#[doc = "ID: 148"]
6654#[derive(Debug, Clone, PartialEq)]
6655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6657#[cfg_attr(feature = "ts", derive(TS))]
6658#[cfg_attr(feature = "ts", ts(export))]
6659pub struct AUTOPILOT_VERSION_DATA {
6660    #[doc = "Bitmap of capabilities"]
6661    pub capabilities: MavProtocolCapability,
6662    #[doc = "UID if provided by hardware (see uid2)"]
6663    pub uid: u64,
6664    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6665    pub flight_sw_version: u32,
6666    #[doc = "Middleware version number"]
6667    pub middleware_sw_version: u32,
6668    #[doc = "Operating system version number"]
6669    pub os_sw_version: u32,
6670    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6671    pub board_version: u32,
6672    #[doc = "ID of the board vendor"]
6673    pub vendor_id: u16,
6674    #[doc = "ID of the product"]
6675    pub product_id: u16,
6676    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6677    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6678    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6679    pub flight_custom_version: [u8; 8],
6680    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6681    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6682    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6683    pub middleware_custom_version: [u8; 8],
6684    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6685    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6686    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6687    pub os_custom_version: [u8; 8],
6688    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6689    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6690    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6691    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6692    pub uid2: [u8; 18],
6693}
6694impl AUTOPILOT_VERSION_DATA {
6695    pub const ENCODED_LEN: usize = 78usize;
6696    pub const DEFAULT: Self = Self {
6697        capabilities: MavProtocolCapability::DEFAULT,
6698        uid: 0_u64,
6699        flight_sw_version: 0_u32,
6700        middleware_sw_version: 0_u32,
6701        os_sw_version: 0_u32,
6702        board_version: 0_u32,
6703        vendor_id: 0_u16,
6704        product_id: 0_u16,
6705        flight_custom_version: [0_u8; 8usize],
6706        middleware_custom_version: [0_u8; 8usize],
6707        os_custom_version: [0_u8; 8usize],
6708        uid2: [0_u8; 18usize],
6709    };
6710    #[cfg(feature = "arbitrary")]
6711    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6712        use arbitrary::{Arbitrary, Unstructured};
6713        let mut buf = [0u8; 1024];
6714        rng.fill_bytes(&mut buf);
6715        let mut unstructured = Unstructured::new(&buf);
6716        Self::arbitrary(&mut unstructured).unwrap_or_default()
6717    }
6718}
6719impl Default for AUTOPILOT_VERSION_DATA {
6720    fn default() -> Self {
6721        Self::DEFAULT.clone()
6722    }
6723}
6724impl MessageData for AUTOPILOT_VERSION_DATA {
6725    type Message = MavMessage;
6726    const ID: u32 = 148u32;
6727    const NAME: &'static str = "AUTOPILOT_VERSION";
6728    const EXTRA_CRC: u8 = 178u8;
6729    const ENCODED_LEN: usize = 78usize;
6730    fn deser(
6731        _version: MavlinkVersion,
6732        __input: &[u8],
6733    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6734        let avail_len = __input.len();
6735        let mut payload_buf = [0; Self::ENCODED_LEN];
6736        let mut buf = if avail_len < Self::ENCODED_LEN {
6737            payload_buf[0..avail_len].copy_from_slice(__input);
6738            Bytes::new(&payload_buf)
6739        } else {
6740            Bytes::new(__input)
6741        };
6742        let mut __struct = Self::default();
6743        let tmp = buf.get_u64_le();
6744        __struct.capabilities = MavProtocolCapability::from_bits(
6745            tmp as <MavProtocolCapability as Flags>::Bits,
6746        )
6747        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6748            flag_type: "MavProtocolCapability",
6749            value: tmp as u64,
6750        })?;
6751        __struct.uid = buf.get_u64_le();
6752        __struct.flight_sw_version = buf.get_u32_le();
6753        __struct.middleware_sw_version = buf.get_u32_le();
6754        __struct.os_sw_version = buf.get_u32_le();
6755        __struct.board_version = buf.get_u32_le();
6756        __struct.vendor_id = buf.get_u16_le();
6757        __struct.product_id = buf.get_u16_le();
6758        for v in &mut __struct.flight_custom_version {
6759            let val = buf.get_u8();
6760            *v = val;
6761        }
6762        for v in &mut __struct.middleware_custom_version {
6763            let val = buf.get_u8();
6764            *v = val;
6765        }
6766        for v in &mut __struct.os_custom_version {
6767            let val = buf.get_u8();
6768            *v = val;
6769        }
6770        for v in &mut __struct.uid2 {
6771            let val = buf.get_u8();
6772            *v = val;
6773        }
6774        Ok(__struct)
6775    }
6776    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6777        let mut __tmp = BytesMut::new(bytes);
6778        #[allow(clippy::absurd_extreme_comparisons)]
6779        #[allow(unused_comparisons)]
6780        if __tmp.remaining() < Self::ENCODED_LEN {
6781            panic!(
6782                "buffer is too small (need {} bytes, but got {})",
6783                Self::ENCODED_LEN,
6784                __tmp.remaining(),
6785            )
6786        }
6787        __tmp.put_u64_le(self.capabilities.bits() as u64);
6788        __tmp.put_u64_le(self.uid);
6789        __tmp.put_u32_le(self.flight_sw_version);
6790        __tmp.put_u32_le(self.middleware_sw_version);
6791        __tmp.put_u32_le(self.os_sw_version);
6792        __tmp.put_u32_le(self.board_version);
6793        __tmp.put_u16_le(self.vendor_id);
6794        __tmp.put_u16_le(self.product_id);
6795        for val in &self.flight_custom_version {
6796            __tmp.put_u8(*val);
6797        }
6798        for val in &self.middleware_custom_version {
6799            __tmp.put_u8(*val);
6800        }
6801        for val in &self.os_custom_version {
6802            __tmp.put_u8(*val);
6803        }
6804        if matches!(version, MavlinkVersion::V2) {
6805            for val in &self.uid2 {
6806                __tmp.put_u8(*val);
6807            }
6808            let len = __tmp.len();
6809            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6810        } else {
6811            __tmp.len()
6812        }
6813    }
6814}
6815#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6816#[doc = ""]
6817#[doc = "ID: 435"]
6818#[derive(Debug, Clone, PartialEq)]
6819#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6821#[cfg_attr(feature = "ts", derive(TS))]
6822#[cfg_attr(feature = "ts", ts(export))]
6823pub struct AVAILABLE_MODES_DATA {
6824    #[doc = "A bitfield for use for autopilot-specific flags"]
6825    pub custom_mode: u32,
6826    #[doc = "Mode properties."]
6827    pub properties: MavModeProperty,
6828    #[doc = "The total number of available modes for the current vehicle type."]
6829    pub number_modes: u8,
6830    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6831    pub mode_index: u8,
6832    #[doc = "Standard mode."]
6833    pub standard_mode: MavStandardMode,
6834    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6835    #[cfg_attr(feature = "ts", ts(type = "string"))]
6836    pub mode_name: CharArray<35>,
6837}
6838impl AVAILABLE_MODES_DATA {
6839    pub const ENCODED_LEN: usize = 46usize;
6840    pub const DEFAULT: Self = Self {
6841        custom_mode: 0_u32,
6842        properties: MavModeProperty::DEFAULT,
6843        number_modes: 0_u8,
6844        mode_index: 0_u8,
6845        standard_mode: MavStandardMode::DEFAULT,
6846        mode_name: CharArray::new([0_u8; 35usize]),
6847    };
6848    #[cfg(feature = "arbitrary")]
6849    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6850        use arbitrary::{Arbitrary, Unstructured};
6851        let mut buf = [0u8; 1024];
6852        rng.fill_bytes(&mut buf);
6853        let mut unstructured = Unstructured::new(&buf);
6854        Self::arbitrary(&mut unstructured).unwrap_or_default()
6855    }
6856}
6857impl Default for AVAILABLE_MODES_DATA {
6858    fn default() -> Self {
6859        Self::DEFAULT.clone()
6860    }
6861}
6862impl MessageData for AVAILABLE_MODES_DATA {
6863    type Message = MavMessage;
6864    const ID: u32 = 435u32;
6865    const NAME: &'static str = "AVAILABLE_MODES";
6866    const EXTRA_CRC: u8 = 134u8;
6867    const ENCODED_LEN: usize = 46usize;
6868    fn deser(
6869        _version: MavlinkVersion,
6870        __input: &[u8],
6871    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6872        let avail_len = __input.len();
6873        let mut payload_buf = [0; Self::ENCODED_LEN];
6874        let mut buf = if avail_len < Self::ENCODED_LEN {
6875            payload_buf[0..avail_len].copy_from_slice(__input);
6876            Bytes::new(&payload_buf)
6877        } else {
6878            Bytes::new(__input)
6879        };
6880        let mut __struct = Self::default();
6881        __struct.custom_mode = buf.get_u32_le();
6882        let tmp = buf.get_u32_le();
6883        __struct.properties = MavModeProperty::from_bits(tmp as <MavModeProperty as Flags>::Bits)
6884            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6885            flag_type: "MavModeProperty",
6886            value: tmp as u64,
6887        })?;
6888        __struct.number_modes = buf.get_u8();
6889        __struct.mode_index = buf.get_u8();
6890        let tmp = buf.get_u8();
6891        __struct.standard_mode =
6892            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6893                enum_type: "MavStandardMode",
6894                value: tmp as u64,
6895            })?;
6896        let mut tmp = [0_u8; 35usize];
6897        for v in &mut tmp {
6898            *v = buf.get_u8();
6899        }
6900        __struct.mode_name = CharArray::new(tmp);
6901        Ok(__struct)
6902    }
6903    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6904        let mut __tmp = BytesMut::new(bytes);
6905        #[allow(clippy::absurd_extreme_comparisons)]
6906        #[allow(unused_comparisons)]
6907        if __tmp.remaining() < Self::ENCODED_LEN {
6908            panic!(
6909                "buffer is too small (need {} bytes, but got {})",
6910                Self::ENCODED_LEN,
6911                __tmp.remaining(),
6912            )
6913        }
6914        __tmp.put_u32_le(self.custom_mode);
6915        __tmp.put_u32_le(self.properties.bits() as u32);
6916        __tmp.put_u8(self.number_modes);
6917        __tmp.put_u8(self.mode_index);
6918        __tmp.put_u8(self.standard_mode as u8);
6919        for val in &self.mode_name {
6920            __tmp.put_u8(*val);
6921        }
6922        if matches!(version, MavlinkVersion::V2) {
6923            let len = __tmp.len();
6924            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6925        } else {
6926            __tmp.len()
6927        }
6928    }
6929}
6930#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6931#[doc = ""]
6932#[doc = "ID: 437"]
6933#[derive(Debug, Clone, PartialEq)]
6934#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6935#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6936#[cfg_attr(feature = "ts", derive(TS))]
6937#[cfg_attr(feature = "ts", ts(export))]
6938pub struct AVAILABLE_MODES_MONITOR_DATA {
6939    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6940    pub seq: u8,
6941}
6942impl AVAILABLE_MODES_MONITOR_DATA {
6943    pub const ENCODED_LEN: usize = 1usize;
6944    pub const DEFAULT: Self = Self { seq: 0_u8 };
6945    #[cfg(feature = "arbitrary")]
6946    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6947        use arbitrary::{Arbitrary, Unstructured};
6948        let mut buf = [0u8; 1024];
6949        rng.fill_bytes(&mut buf);
6950        let mut unstructured = Unstructured::new(&buf);
6951        Self::arbitrary(&mut unstructured).unwrap_or_default()
6952    }
6953}
6954impl Default for AVAILABLE_MODES_MONITOR_DATA {
6955    fn default() -> Self {
6956        Self::DEFAULT.clone()
6957    }
6958}
6959impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6960    type Message = MavMessage;
6961    const ID: u32 = 437u32;
6962    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6963    const EXTRA_CRC: u8 = 30u8;
6964    const ENCODED_LEN: usize = 1usize;
6965    fn deser(
6966        _version: MavlinkVersion,
6967        __input: &[u8],
6968    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6969        let avail_len = __input.len();
6970        let mut payload_buf = [0; Self::ENCODED_LEN];
6971        let mut buf = if avail_len < Self::ENCODED_LEN {
6972            payload_buf[0..avail_len].copy_from_slice(__input);
6973            Bytes::new(&payload_buf)
6974        } else {
6975            Bytes::new(__input)
6976        };
6977        let mut __struct = Self::default();
6978        __struct.seq = buf.get_u8();
6979        Ok(__struct)
6980    }
6981    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6982        let mut __tmp = BytesMut::new(bytes);
6983        #[allow(clippy::absurd_extreme_comparisons)]
6984        #[allow(unused_comparisons)]
6985        if __tmp.remaining() < Self::ENCODED_LEN {
6986            panic!(
6987                "buffer is too small (need {} bytes, but got {})",
6988                Self::ENCODED_LEN,
6989                __tmp.remaining(),
6990            )
6991        }
6992        __tmp.put_u8(self.seq);
6993        if matches!(version, MavlinkVersion::V2) {
6994            let len = __tmp.len();
6995            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6996        } else {
6997            __tmp.len()
6998        }
6999    }
7000}
7001#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
7002#[doc = ""]
7003#[doc = "ID: 372"]
7004#[derive(Debug, Clone, PartialEq)]
7005#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7006#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7007#[cfg_attr(feature = "ts", derive(TS))]
7008#[cfg_attr(feature = "ts", ts(export))]
7009pub struct BATTERY_INFO_DATA {
7010    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
7011    pub discharge_minimum_voltage: f32,
7012    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
7013    pub charging_minimum_voltage: f32,
7014    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
7015    pub resting_minimum_voltage: f32,
7016    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
7017    pub charging_maximum_voltage: f32,
7018    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
7019    pub charging_maximum_current: f32,
7020    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
7021    pub nominal_voltage: f32,
7022    #[doc = "Maximum pack discharge current. 0: field not provided."]
7023    pub discharge_maximum_current: f32,
7024    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
7025    pub discharge_maximum_burst_current: f32,
7026    #[doc = "Fully charged design capacity. 0: field not provided."]
7027    pub design_capacity: f32,
7028    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
7029    pub full_charge_capacity: f32,
7030    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
7031    pub cycle_count: u16,
7032    #[doc = "Battery weight. 0: field not provided."]
7033    pub weight: u16,
7034    #[doc = "Battery ID"]
7035    pub id: u8,
7036    #[doc = "Function of the battery."]
7037    pub battery_function: MavBatteryFunction,
7038    #[doc = "Type (chemistry) of the battery."]
7039    pub mavtype: MavBatteryType,
7040    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
7041    pub state_of_health: u8,
7042    #[doc = "Number of battery cells in series. 0: field not provided."]
7043    pub cells_in_series: u8,
7044    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
7045    #[cfg_attr(feature = "ts", ts(type = "string"))]
7046    pub manufacture_date: CharArray<9>,
7047    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
7048    #[cfg_attr(feature = "ts", ts(type = "string"))]
7049    pub serial_number: CharArray<32>,
7050    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
7051    #[cfg_attr(feature = "ts", ts(type = "string"))]
7052    pub name: CharArray<50>,
7053}
7054impl BATTERY_INFO_DATA {
7055    pub const ENCODED_LEN: usize = 140usize;
7056    pub const DEFAULT: Self = Self {
7057        discharge_minimum_voltage: 0.0_f32,
7058        charging_minimum_voltage: 0.0_f32,
7059        resting_minimum_voltage: 0.0_f32,
7060        charging_maximum_voltage: 0.0_f32,
7061        charging_maximum_current: 0.0_f32,
7062        nominal_voltage: 0.0_f32,
7063        discharge_maximum_current: 0.0_f32,
7064        discharge_maximum_burst_current: 0.0_f32,
7065        design_capacity: 0.0_f32,
7066        full_charge_capacity: 0.0_f32,
7067        cycle_count: 0_u16,
7068        weight: 0_u16,
7069        id: 0_u8,
7070        battery_function: MavBatteryFunction::DEFAULT,
7071        mavtype: MavBatteryType::DEFAULT,
7072        state_of_health: 0_u8,
7073        cells_in_series: 0_u8,
7074        manufacture_date: CharArray::new([0_u8; 9usize]),
7075        serial_number: CharArray::new([0_u8; 32usize]),
7076        name: CharArray::new([0_u8; 50usize]),
7077    };
7078    #[cfg(feature = "arbitrary")]
7079    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7080        use arbitrary::{Arbitrary, Unstructured};
7081        let mut buf = [0u8; 1024];
7082        rng.fill_bytes(&mut buf);
7083        let mut unstructured = Unstructured::new(&buf);
7084        Self::arbitrary(&mut unstructured).unwrap_or_default()
7085    }
7086}
7087impl Default for BATTERY_INFO_DATA {
7088    fn default() -> Self {
7089        Self::DEFAULT.clone()
7090    }
7091}
7092impl MessageData for BATTERY_INFO_DATA {
7093    type Message = MavMessage;
7094    const ID: u32 = 372u32;
7095    const NAME: &'static str = "BATTERY_INFO";
7096    const EXTRA_CRC: u8 = 26u8;
7097    const ENCODED_LEN: usize = 140usize;
7098    fn deser(
7099        _version: MavlinkVersion,
7100        __input: &[u8],
7101    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7102        let avail_len = __input.len();
7103        let mut payload_buf = [0; Self::ENCODED_LEN];
7104        let mut buf = if avail_len < Self::ENCODED_LEN {
7105            payload_buf[0..avail_len].copy_from_slice(__input);
7106            Bytes::new(&payload_buf)
7107        } else {
7108            Bytes::new(__input)
7109        };
7110        let mut __struct = Self::default();
7111        __struct.discharge_minimum_voltage = buf.get_f32_le();
7112        __struct.charging_minimum_voltage = buf.get_f32_le();
7113        __struct.resting_minimum_voltage = buf.get_f32_le();
7114        __struct.charging_maximum_voltage = buf.get_f32_le();
7115        __struct.charging_maximum_current = buf.get_f32_le();
7116        __struct.nominal_voltage = buf.get_f32_le();
7117        __struct.discharge_maximum_current = buf.get_f32_le();
7118        __struct.discharge_maximum_burst_current = buf.get_f32_le();
7119        __struct.design_capacity = buf.get_f32_le();
7120        __struct.full_charge_capacity = buf.get_f32_le();
7121        __struct.cycle_count = buf.get_u16_le();
7122        __struct.weight = buf.get_u16_le();
7123        __struct.id = buf.get_u8();
7124        let tmp = buf.get_u8();
7125        __struct.battery_function =
7126            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7127                enum_type: "MavBatteryFunction",
7128                value: tmp as u64,
7129            })?;
7130        let tmp = buf.get_u8();
7131        __struct.mavtype =
7132            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7133                enum_type: "MavBatteryType",
7134                value: tmp as u64,
7135            })?;
7136        __struct.state_of_health = buf.get_u8();
7137        __struct.cells_in_series = buf.get_u8();
7138        let mut tmp = [0_u8; 9usize];
7139        for v in &mut tmp {
7140            *v = buf.get_u8();
7141        }
7142        __struct.manufacture_date = CharArray::new(tmp);
7143        let mut tmp = [0_u8; 32usize];
7144        for v in &mut tmp {
7145            *v = buf.get_u8();
7146        }
7147        __struct.serial_number = CharArray::new(tmp);
7148        let mut tmp = [0_u8; 50usize];
7149        for v in &mut tmp {
7150            *v = buf.get_u8();
7151        }
7152        __struct.name = CharArray::new(tmp);
7153        Ok(__struct)
7154    }
7155    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7156        let mut __tmp = BytesMut::new(bytes);
7157        #[allow(clippy::absurd_extreme_comparisons)]
7158        #[allow(unused_comparisons)]
7159        if __tmp.remaining() < Self::ENCODED_LEN {
7160            panic!(
7161                "buffer is too small (need {} bytes, but got {})",
7162                Self::ENCODED_LEN,
7163                __tmp.remaining(),
7164            )
7165        }
7166        __tmp.put_f32_le(self.discharge_minimum_voltage);
7167        __tmp.put_f32_le(self.charging_minimum_voltage);
7168        __tmp.put_f32_le(self.resting_minimum_voltage);
7169        __tmp.put_f32_le(self.charging_maximum_voltage);
7170        __tmp.put_f32_le(self.charging_maximum_current);
7171        __tmp.put_f32_le(self.nominal_voltage);
7172        __tmp.put_f32_le(self.discharge_maximum_current);
7173        __tmp.put_f32_le(self.discharge_maximum_burst_current);
7174        __tmp.put_f32_le(self.design_capacity);
7175        __tmp.put_f32_le(self.full_charge_capacity);
7176        __tmp.put_u16_le(self.cycle_count);
7177        __tmp.put_u16_le(self.weight);
7178        __tmp.put_u8(self.id);
7179        __tmp.put_u8(self.battery_function as u8);
7180        __tmp.put_u8(self.mavtype as u8);
7181        __tmp.put_u8(self.state_of_health);
7182        __tmp.put_u8(self.cells_in_series);
7183        for val in &self.manufacture_date {
7184            __tmp.put_u8(*val);
7185        }
7186        for val in &self.serial_number {
7187            __tmp.put_u8(*val);
7188        }
7189        for val in &self.name {
7190            __tmp.put_u8(*val);
7191        }
7192        if matches!(version, MavlinkVersion::V2) {
7193            let len = __tmp.len();
7194            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7195        } else {
7196            __tmp.len()
7197        }
7198    }
7199}
7200#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
7201#[doc = ""]
7202#[doc = "ID: 147"]
7203#[derive(Debug, Clone, PartialEq)]
7204#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7205#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7206#[cfg_attr(feature = "ts", derive(TS))]
7207#[cfg_attr(feature = "ts", ts(export))]
7208pub struct BATTERY_STATUS_DATA {
7209    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
7210    pub current_consumed: i32,
7211    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
7212    pub energy_consumed: i32,
7213    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
7214    pub temperature: i16,
7215    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
7216    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7217    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7218    pub voltages: [u16; 10],
7219    #[doc = "Battery current, -1: autopilot does not measure the current"]
7220    pub current_battery: i16,
7221    #[doc = "Battery ID"]
7222    pub id: u8,
7223    #[doc = "Function of the battery"]
7224    pub battery_function: MavBatteryFunction,
7225    #[doc = "Type (chemistry) of the battery"]
7226    pub mavtype: MavBatteryType,
7227    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
7228    pub battery_remaining: i8,
7229    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
7230    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7231    pub time_remaining: i32,
7232    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
7233    #[cfg_attr(feature = "serde", serde(default))]
7234    pub charge_state: MavBatteryChargeState,
7235    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
7236    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7237    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7238    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7239    pub voltages_ext: [u16; 4],
7240    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
7241    #[cfg_attr(feature = "serde", serde(default))]
7242    pub mode: MavBatteryMode,
7243    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
7244    #[cfg_attr(feature = "serde", serde(default))]
7245    pub fault_bitmask: MavBatteryFault,
7246}
7247impl BATTERY_STATUS_DATA {
7248    pub const ENCODED_LEN: usize = 54usize;
7249    pub const DEFAULT: Self = Self {
7250        current_consumed: 0_i32,
7251        energy_consumed: 0_i32,
7252        temperature: 0_i16,
7253        voltages: [0_u16; 10usize],
7254        current_battery: 0_i16,
7255        id: 0_u8,
7256        battery_function: MavBatteryFunction::DEFAULT,
7257        mavtype: MavBatteryType::DEFAULT,
7258        battery_remaining: 0_i8,
7259        time_remaining: 0_i32,
7260        charge_state: MavBatteryChargeState::DEFAULT,
7261        voltages_ext: [0_u16; 4usize],
7262        mode: MavBatteryMode::DEFAULT,
7263        fault_bitmask: MavBatteryFault::DEFAULT,
7264    };
7265    #[cfg(feature = "arbitrary")]
7266    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7267        use arbitrary::{Arbitrary, Unstructured};
7268        let mut buf = [0u8; 1024];
7269        rng.fill_bytes(&mut buf);
7270        let mut unstructured = Unstructured::new(&buf);
7271        Self::arbitrary(&mut unstructured).unwrap_or_default()
7272    }
7273}
7274impl Default for BATTERY_STATUS_DATA {
7275    fn default() -> Self {
7276        Self::DEFAULT.clone()
7277    }
7278}
7279impl MessageData for BATTERY_STATUS_DATA {
7280    type Message = MavMessage;
7281    const ID: u32 = 147u32;
7282    const NAME: &'static str = "BATTERY_STATUS";
7283    const EXTRA_CRC: u8 = 154u8;
7284    const ENCODED_LEN: usize = 54usize;
7285    fn deser(
7286        _version: MavlinkVersion,
7287        __input: &[u8],
7288    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7289        let avail_len = __input.len();
7290        let mut payload_buf = [0; Self::ENCODED_LEN];
7291        let mut buf = if avail_len < Self::ENCODED_LEN {
7292            payload_buf[0..avail_len].copy_from_slice(__input);
7293            Bytes::new(&payload_buf)
7294        } else {
7295            Bytes::new(__input)
7296        };
7297        let mut __struct = Self::default();
7298        __struct.current_consumed = buf.get_i32_le();
7299        __struct.energy_consumed = buf.get_i32_le();
7300        __struct.temperature = buf.get_i16_le();
7301        for v in &mut __struct.voltages {
7302            let val = buf.get_u16_le();
7303            *v = val;
7304        }
7305        __struct.current_battery = buf.get_i16_le();
7306        __struct.id = buf.get_u8();
7307        let tmp = buf.get_u8();
7308        __struct.battery_function =
7309            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7310                enum_type: "MavBatteryFunction",
7311                value: tmp as u64,
7312            })?;
7313        let tmp = buf.get_u8();
7314        __struct.mavtype =
7315            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7316                enum_type: "MavBatteryType",
7317                value: tmp as u64,
7318            })?;
7319        __struct.battery_remaining = buf.get_i8();
7320        __struct.time_remaining = buf.get_i32_le();
7321        let tmp = buf.get_u8();
7322        __struct.charge_state =
7323            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7324                enum_type: "MavBatteryChargeState",
7325                value: tmp as u64,
7326            })?;
7327        for v in &mut __struct.voltages_ext {
7328            let val = buf.get_u16_le();
7329            *v = val;
7330        }
7331        let tmp = buf.get_u8();
7332        __struct.mode =
7333            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7334                enum_type: "MavBatteryMode",
7335                value: tmp as u64,
7336            })?;
7337        let tmp = buf.get_u32_le();
7338        __struct.fault_bitmask = MavBatteryFault::from_bits(
7339            tmp as <MavBatteryFault as Flags>::Bits,
7340        )
7341        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7342            flag_type: "MavBatteryFault",
7343            value: tmp as u64,
7344        })?;
7345        Ok(__struct)
7346    }
7347    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7348        let mut __tmp = BytesMut::new(bytes);
7349        #[allow(clippy::absurd_extreme_comparisons)]
7350        #[allow(unused_comparisons)]
7351        if __tmp.remaining() < Self::ENCODED_LEN {
7352            panic!(
7353                "buffer is too small (need {} bytes, but got {})",
7354                Self::ENCODED_LEN,
7355                __tmp.remaining(),
7356            )
7357        }
7358        __tmp.put_i32_le(self.current_consumed);
7359        __tmp.put_i32_le(self.energy_consumed);
7360        __tmp.put_i16_le(self.temperature);
7361        for val in &self.voltages {
7362            __tmp.put_u16_le(*val);
7363        }
7364        __tmp.put_i16_le(self.current_battery);
7365        __tmp.put_u8(self.id);
7366        __tmp.put_u8(self.battery_function as u8);
7367        __tmp.put_u8(self.mavtype as u8);
7368        __tmp.put_i8(self.battery_remaining);
7369        if matches!(version, MavlinkVersion::V2) {
7370            __tmp.put_i32_le(self.time_remaining);
7371            __tmp.put_u8(self.charge_state as u8);
7372            for val in &self.voltages_ext {
7373                __tmp.put_u16_le(*val);
7374            }
7375            __tmp.put_u8(self.mode as u8);
7376            __tmp.put_u32_le(self.fault_bitmask.bits() as u32);
7377            let len = __tmp.len();
7378            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7379        } else {
7380            __tmp.len()
7381        }
7382    }
7383}
7384#[doc = "Report button state change."]
7385#[doc = ""]
7386#[doc = "ID: 257"]
7387#[derive(Debug, Clone, PartialEq)]
7388#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7389#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7390#[cfg_attr(feature = "ts", derive(TS))]
7391#[cfg_attr(feature = "ts", ts(export))]
7392pub struct BUTTON_CHANGE_DATA {
7393    #[doc = "Timestamp (time since system boot)."]
7394    pub time_boot_ms: u32,
7395    #[doc = "Time of last change of button state."]
7396    pub last_change_ms: u32,
7397    #[doc = "Bitmap for state of buttons."]
7398    pub state: u8,
7399}
7400impl BUTTON_CHANGE_DATA {
7401    pub const ENCODED_LEN: usize = 9usize;
7402    pub const DEFAULT: Self = Self {
7403        time_boot_ms: 0_u32,
7404        last_change_ms: 0_u32,
7405        state: 0_u8,
7406    };
7407    #[cfg(feature = "arbitrary")]
7408    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7409        use arbitrary::{Arbitrary, Unstructured};
7410        let mut buf = [0u8; 1024];
7411        rng.fill_bytes(&mut buf);
7412        let mut unstructured = Unstructured::new(&buf);
7413        Self::arbitrary(&mut unstructured).unwrap_or_default()
7414    }
7415}
7416impl Default for BUTTON_CHANGE_DATA {
7417    fn default() -> Self {
7418        Self::DEFAULT.clone()
7419    }
7420}
7421impl MessageData for BUTTON_CHANGE_DATA {
7422    type Message = MavMessage;
7423    const ID: u32 = 257u32;
7424    const NAME: &'static str = "BUTTON_CHANGE";
7425    const EXTRA_CRC: u8 = 131u8;
7426    const ENCODED_LEN: usize = 9usize;
7427    fn deser(
7428        _version: MavlinkVersion,
7429        __input: &[u8],
7430    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7431        let avail_len = __input.len();
7432        let mut payload_buf = [0; Self::ENCODED_LEN];
7433        let mut buf = if avail_len < Self::ENCODED_LEN {
7434            payload_buf[0..avail_len].copy_from_slice(__input);
7435            Bytes::new(&payload_buf)
7436        } else {
7437            Bytes::new(__input)
7438        };
7439        let mut __struct = Self::default();
7440        __struct.time_boot_ms = buf.get_u32_le();
7441        __struct.last_change_ms = buf.get_u32_le();
7442        __struct.state = buf.get_u8();
7443        Ok(__struct)
7444    }
7445    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7446        let mut __tmp = BytesMut::new(bytes);
7447        #[allow(clippy::absurd_extreme_comparisons)]
7448        #[allow(unused_comparisons)]
7449        if __tmp.remaining() < Self::ENCODED_LEN {
7450            panic!(
7451                "buffer is too small (need {} bytes, but got {})",
7452                Self::ENCODED_LEN,
7453                __tmp.remaining(),
7454            )
7455        }
7456        __tmp.put_u32_le(self.time_boot_ms);
7457        __tmp.put_u32_le(self.last_change_ms);
7458        __tmp.put_u8(self.state);
7459        if matches!(version, MavlinkVersion::V2) {
7460            let len = __tmp.len();
7461            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7462        } else {
7463            __tmp.len()
7464        }
7465    }
7466}
7467#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7468#[doc = ""]
7469#[doc = "ID: 262"]
7470#[derive(Debug, Clone, PartialEq)]
7471#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7472#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7473#[cfg_attr(feature = "ts", derive(TS))]
7474#[cfg_attr(feature = "ts", ts(export))]
7475pub struct CAMERA_CAPTURE_STATUS_DATA {
7476    #[doc = "Timestamp (time since system boot)."]
7477    pub time_boot_ms: u32,
7478    #[doc = "Image capture interval"]
7479    pub image_interval: f32,
7480    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
7481    pub recording_time_ms: u32,
7482    #[doc = "Available storage capacity."]
7483    pub available_capacity: f32,
7484    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
7485    pub image_status: u8,
7486    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7487    pub video_status: u8,
7488    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7489    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7490    pub image_count: i32,
7491    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7492    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7493    pub camera_device_id: u8,
7494}
7495impl CAMERA_CAPTURE_STATUS_DATA {
7496    pub const ENCODED_LEN: usize = 23usize;
7497    pub const DEFAULT: Self = Self {
7498        time_boot_ms: 0_u32,
7499        image_interval: 0.0_f32,
7500        recording_time_ms: 0_u32,
7501        available_capacity: 0.0_f32,
7502        image_status: 0_u8,
7503        video_status: 0_u8,
7504        image_count: 0_i32,
7505        camera_device_id: 0_u8,
7506    };
7507    #[cfg(feature = "arbitrary")]
7508    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7509        use arbitrary::{Arbitrary, Unstructured};
7510        let mut buf = [0u8; 1024];
7511        rng.fill_bytes(&mut buf);
7512        let mut unstructured = Unstructured::new(&buf);
7513        Self::arbitrary(&mut unstructured).unwrap_or_default()
7514    }
7515}
7516impl Default for CAMERA_CAPTURE_STATUS_DATA {
7517    fn default() -> Self {
7518        Self::DEFAULT.clone()
7519    }
7520}
7521impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7522    type Message = MavMessage;
7523    const ID: u32 = 262u32;
7524    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7525    const EXTRA_CRC: u8 = 12u8;
7526    const ENCODED_LEN: usize = 23usize;
7527    fn deser(
7528        _version: MavlinkVersion,
7529        __input: &[u8],
7530    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7531        let avail_len = __input.len();
7532        let mut payload_buf = [0; Self::ENCODED_LEN];
7533        let mut buf = if avail_len < Self::ENCODED_LEN {
7534            payload_buf[0..avail_len].copy_from_slice(__input);
7535            Bytes::new(&payload_buf)
7536        } else {
7537            Bytes::new(__input)
7538        };
7539        let mut __struct = Self::default();
7540        __struct.time_boot_ms = buf.get_u32_le();
7541        __struct.image_interval = buf.get_f32_le();
7542        __struct.recording_time_ms = buf.get_u32_le();
7543        __struct.available_capacity = buf.get_f32_le();
7544        __struct.image_status = buf.get_u8();
7545        __struct.video_status = buf.get_u8();
7546        __struct.image_count = buf.get_i32_le();
7547        __struct.camera_device_id = buf.get_u8();
7548        Ok(__struct)
7549    }
7550    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7551        let mut __tmp = BytesMut::new(bytes);
7552        #[allow(clippy::absurd_extreme_comparisons)]
7553        #[allow(unused_comparisons)]
7554        if __tmp.remaining() < Self::ENCODED_LEN {
7555            panic!(
7556                "buffer is too small (need {} bytes, but got {})",
7557                Self::ENCODED_LEN,
7558                __tmp.remaining(),
7559            )
7560        }
7561        __tmp.put_u32_le(self.time_boot_ms);
7562        __tmp.put_f32_le(self.image_interval);
7563        __tmp.put_u32_le(self.recording_time_ms);
7564        __tmp.put_f32_le(self.available_capacity);
7565        __tmp.put_u8(self.image_status);
7566        __tmp.put_u8(self.video_status);
7567        if matches!(version, MavlinkVersion::V2) {
7568            __tmp.put_i32_le(self.image_count);
7569            __tmp.put_u8(self.camera_device_id);
7570            let len = __tmp.len();
7571            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7572        } else {
7573            __tmp.len()
7574        }
7575    }
7576}
7577#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7578#[doc = ""]
7579#[doc = "ID: 271"]
7580#[derive(Debug, Clone, PartialEq)]
7581#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7582#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7583#[cfg_attr(feature = "ts", derive(TS))]
7584#[cfg_attr(feature = "ts", ts(export))]
7585pub struct CAMERA_FOV_STATUS_DATA {
7586    #[doc = "Timestamp (time since system boot)."]
7587    pub time_boot_ms: u32,
7588    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7589    pub lat_camera: i32,
7590    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7591    pub lon_camera: i32,
7592    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7593    pub alt_camera: i32,
7594    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7595    pub lat_image: i32,
7596    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7597    pub lon_image: i32,
7598    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7599    pub alt_image: i32,
7600    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7601    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7602    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7603    pub q: [f32; 4],
7604    #[doc = "Horizontal field of view (NaN if unknown)."]
7605    pub hfov: f32,
7606    #[doc = "Vertical field of view (NaN if unknown)."]
7607    pub vfov: f32,
7608    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7609    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7610    pub camera_device_id: u8,
7611}
7612impl CAMERA_FOV_STATUS_DATA {
7613    pub const ENCODED_LEN: usize = 53usize;
7614    pub const DEFAULT: Self = Self {
7615        time_boot_ms: 0_u32,
7616        lat_camera: 0_i32,
7617        lon_camera: 0_i32,
7618        alt_camera: 0_i32,
7619        lat_image: 0_i32,
7620        lon_image: 0_i32,
7621        alt_image: 0_i32,
7622        q: [0.0_f32; 4usize],
7623        hfov: 0.0_f32,
7624        vfov: 0.0_f32,
7625        camera_device_id: 0_u8,
7626    };
7627    #[cfg(feature = "arbitrary")]
7628    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7629        use arbitrary::{Arbitrary, Unstructured};
7630        let mut buf = [0u8; 1024];
7631        rng.fill_bytes(&mut buf);
7632        let mut unstructured = Unstructured::new(&buf);
7633        Self::arbitrary(&mut unstructured).unwrap_or_default()
7634    }
7635}
7636impl Default for CAMERA_FOV_STATUS_DATA {
7637    fn default() -> Self {
7638        Self::DEFAULT.clone()
7639    }
7640}
7641impl MessageData for CAMERA_FOV_STATUS_DATA {
7642    type Message = MavMessage;
7643    const ID: u32 = 271u32;
7644    const NAME: &'static str = "CAMERA_FOV_STATUS";
7645    const EXTRA_CRC: u8 = 22u8;
7646    const ENCODED_LEN: usize = 53usize;
7647    fn deser(
7648        _version: MavlinkVersion,
7649        __input: &[u8],
7650    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7651        let avail_len = __input.len();
7652        let mut payload_buf = [0; Self::ENCODED_LEN];
7653        let mut buf = if avail_len < Self::ENCODED_LEN {
7654            payload_buf[0..avail_len].copy_from_slice(__input);
7655            Bytes::new(&payload_buf)
7656        } else {
7657            Bytes::new(__input)
7658        };
7659        let mut __struct = Self::default();
7660        __struct.time_boot_ms = buf.get_u32_le();
7661        __struct.lat_camera = buf.get_i32_le();
7662        __struct.lon_camera = buf.get_i32_le();
7663        __struct.alt_camera = buf.get_i32_le();
7664        __struct.lat_image = buf.get_i32_le();
7665        __struct.lon_image = buf.get_i32_le();
7666        __struct.alt_image = buf.get_i32_le();
7667        for v in &mut __struct.q {
7668            let val = buf.get_f32_le();
7669            *v = val;
7670        }
7671        __struct.hfov = buf.get_f32_le();
7672        __struct.vfov = buf.get_f32_le();
7673        __struct.camera_device_id = buf.get_u8();
7674        Ok(__struct)
7675    }
7676    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7677        let mut __tmp = BytesMut::new(bytes);
7678        #[allow(clippy::absurd_extreme_comparisons)]
7679        #[allow(unused_comparisons)]
7680        if __tmp.remaining() < Self::ENCODED_LEN {
7681            panic!(
7682                "buffer is too small (need {} bytes, but got {})",
7683                Self::ENCODED_LEN,
7684                __tmp.remaining(),
7685            )
7686        }
7687        __tmp.put_u32_le(self.time_boot_ms);
7688        __tmp.put_i32_le(self.lat_camera);
7689        __tmp.put_i32_le(self.lon_camera);
7690        __tmp.put_i32_le(self.alt_camera);
7691        __tmp.put_i32_le(self.lat_image);
7692        __tmp.put_i32_le(self.lon_image);
7693        __tmp.put_i32_le(self.alt_image);
7694        for val in &self.q {
7695            __tmp.put_f32_le(*val);
7696        }
7697        __tmp.put_f32_le(self.hfov);
7698        __tmp.put_f32_le(self.vfov);
7699        if matches!(version, MavlinkVersion::V2) {
7700            __tmp.put_u8(self.camera_device_id);
7701            let len = __tmp.len();
7702            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7703        } else {
7704            __tmp.len()
7705        }
7706    }
7707}
7708#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7709#[doc = ""]
7710#[doc = "ID: 263"]
7711#[derive(Debug, Clone, PartialEq)]
7712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7713#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7714#[cfg_attr(feature = "ts", derive(TS))]
7715#[cfg_attr(feature = "ts", ts(export))]
7716pub struct CAMERA_IMAGE_CAPTURED_DATA {
7717    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7718    pub time_utc: u64,
7719    #[doc = "Timestamp (time since system boot)."]
7720    pub time_boot_ms: u32,
7721    #[doc = "Latitude where image was taken"]
7722    pub lat: i32,
7723    #[doc = "Longitude where capture was taken"]
7724    pub lon: i32,
7725    #[doc = "Altitude (MSL) where image was taken"]
7726    pub alt: i32,
7727    #[doc = "Altitude above ground"]
7728    pub relative_alt: i32,
7729    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7730    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7731    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7732    pub q: [f32; 4],
7733    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7734    pub image_index: i32,
7735    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7736    pub camera_id: u8,
7737    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7738    pub capture_result: i8,
7739    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7740    #[cfg_attr(feature = "ts", ts(type = "string"))]
7741    pub file_url: CharArray<205>,
7742}
7743impl CAMERA_IMAGE_CAPTURED_DATA {
7744    pub const ENCODED_LEN: usize = 255usize;
7745    pub const DEFAULT: Self = Self {
7746        time_utc: 0_u64,
7747        time_boot_ms: 0_u32,
7748        lat: 0_i32,
7749        lon: 0_i32,
7750        alt: 0_i32,
7751        relative_alt: 0_i32,
7752        q: [0.0_f32; 4usize],
7753        image_index: 0_i32,
7754        camera_id: 0_u8,
7755        capture_result: 0_i8,
7756        file_url: CharArray::new([0_u8; 205usize]),
7757    };
7758    #[cfg(feature = "arbitrary")]
7759    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7760        use arbitrary::{Arbitrary, Unstructured};
7761        let mut buf = [0u8; 1024];
7762        rng.fill_bytes(&mut buf);
7763        let mut unstructured = Unstructured::new(&buf);
7764        Self::arbitrary(&mut unstructured).unwrap_or_default()
7765    }
7766}
7767impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7768    fn default() -> Self {
7769        Self::DEFAULT.clone()
7770    }
7771}
7772impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7773    type Message = MavMessage;
7774    const ID: u32 = 263u32;
7775    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7776    const EXTRA_CRC: u8 = 133u8;
7777    const ENCODED_LEN: usize = 255usize;
7778    fn deser(
7779        _version: MavlinkVersion,
7780        __input: &[u8],
7781    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7782        let avail_len = __input.len();
7783        let mut payload_buf = [0; Self::ENCODED_LEN];
7784        let mut buf = if avail_len < Self::ENCODED_LEN {
7785            payload_buf[0..avail_len].copy_from_slice(__input);
7786            Bytes::new(&payload_buf)
7787        } else {
7788            Bytes::new(__input)
7789        };
7790        let mut __struct = Self::default();
7791        __struct.time_utc = buf.get_u64_le();
7792        __struct.time_boot_ms = buf.get_u32_le();
7793        __struct.lat = buf.get_i32_le();
7794        __struct.lon = buf.get_i32_le();
7795        __struct.alt = buf.get_i32_le();
7796        __struct.relative_alt = buf.get_i32_le();
7797        for v in &mut __struct.q {
7798            let val = buf.get_f32_le();
7799            *v = val;
7800        }
7801        __struct.image_index = buf.get_i32_le();
7802        __struct.camera_id = buf.get_u8();
7803        __struct.capture_result = buf.get_i8();
7804        let mut tmp = [0_u8; 205usize];
7805        for v in &mut tmp {
7806            *v = buf.get_u8();
7807        }
7808        __struct.file_url = CharArray::new(tmp);
7809        Ok(__struct)
7810    }
7811    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7812        let mut __tmp = BytesMut::new(bytes);
7813        #[allow(clippy::absurd_extreme_comparisons)]
7814        #[allow(unused_comparisons)]
7815        if __tmp.remaining() < Self::ENCODED_LEN {
7816            panic!(
7817                "buffer is too small (need {} bytes, but got {})",
7818                Self::ENCODED_LEN,
7819                __tmp.remaining(),
7820            )
7821        }
7822        __tmp.put_u64_le(self.time_utc);
7823        __tmp.put_u32_le(self.time_boot_ms);
7824        __tmp.put_i32_le(self.lat);
7825        __tmp.put_i32_le(self.lon);
7826        __tmp.put_i32_le(self.alt);
7827        __tmp.put_i32_le(self.relative_alt);
7828        for val in &self.q {
7829            __tmp.put_f32_le(*val);
7830        }
7831        __tmp.put_i32_le(self.image_index);
7832        __tmp.put_u8(self.camera_id);
7833        __tmp.put_i8(self.capture_result);
7834        for val in &self.file_url {
7835            __tmp.put_u8(*val);
7836        }
7837        if matches!(version, MavlinkVersion::V2) {
7838            let len = __tmp.len();
7839            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7840        } else {
7841            __tmp.len()
7842        }
7843    }
7844}
7845#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7846#[doc = ""]
7847#[doc = "ID: 259"]
7848#[derive(Debug, Clone, PartialEq)]
7849#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7850#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7851#[cfg_attr(feature = "ts", derive(TS))]
7852#[cfg_attr(feature = "ts", ts(export))]
7853pub struct CAMERA_INFORMATION_DATA {
7854    #[doc = "Timestamp (time since system boot)."]
7855    pub time_boot_ms: u32,
7856    #[doc = "0xff). Use 0 if not known."]
7857    pub firmware_version: u32,
7858    #[doc = "Focal length. Use NaN if not known."]
7859    pub focal_length: f32,
7860    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7861    pub sensor_size_h: f32,
7862    #[doc = "Image sensor size vertical. Use NaN if not known."]
7863    pub sensor_size_v: f32,
7864    #[doc = "Bitmap of camera capability flags."]
7865    pub flags: CameraCapFlags,
7866    #[doc = "Horizontal image resolution. Use 0 if not known."]
7867    pub resolution_h: u16,
7868    #[doc = "Vertical image resolution. Use 0 if not known."]
7869    pub resolution_v: u16,
7870    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7871    pub cam_definition_version: u16,
7872    #[doc = "Name of the camera vendor"]
7873    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7874    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7875    pub vendor_name: [u8; 32],
7876    #[doc = "Name of the camera model"]
7877    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7878    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7879    pub model_name: [u8; 32],
7880    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7881    pub lens_id: u8,
7882    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7883    #[cfg_attr(feature = "ts", ts(type = "string"))]
7884    pub cam_definition_uri: CharArray<140>,
7885    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7886    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7887    pub gimbal_device_id: u8,
7888    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7889    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7890    pub camera_device_id: u8,
7891}
7892impl CAMERA_INFORMATION_DATA {
7893    pub const ENCODED_LEN: usize = 237usize;
7894    pub const DEFAULT: Self = Self {
7895        time_boot_ms: 0_u32,
7896        firmware_version: 0_u32,
7897        focal_length: 0.0_f32,
7898        sensor_size_h: 0.0_f32,
7899        sensor_size_v: 0.0_f32,
7900        flags: CameraCapFlags::DEFAULT,
7901        resolution_h: 0_u16,
7902        resolution_v: 0_u16,
7903        cam_definition_version: 0_u16,
7904        vendor_name: [0_u8; 32usize],
7905        model_name: [0_u8; 32usize],
7906        lens_id: 0_u8,
7907        cam_definition_uri: CharArray::new([0_u8; 140usize]),
7908        gimbal_device_id: 0_u8,
7909        camera_device_id: 0_u8,
7910    };
7911    #[cfg(feature = "arbitrary")]
7912    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7913        use arbitrary::{Arbitrary, Unstructured};
7914        let mut buf = [0u8; 1024];
7915        rng.fill_bytes(&mut buf);
7916        let mut unstructured = Unstructured::new(&buf);
7917        Self::arbitrary(&mut unstructured).unwrap_or_default()
7918    }
7919}
7920impl Default for CAMERA_INFORMATION_DATA {
7921    fn default() -> Self {
7922        Self::DEFAULT.clone()
7923    }
7924}
7925impl MessageData for CAMERA_INFORMATION_DATA {
7926    type Message = MavMessage;
7927    const ID: u32 = 259u32;
7928    const NAME: &'static str = "CAMERA_INFORMATION";
7929    const EXTRA_CRC: u8 = 92u8;
7930    const ENCODED_LEN: usize = 237usize;
7931    fn deser(
7932        _version: MavlinkVersion,
7933        __input: &[u8],
7934    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7935        let avail_len = __input.len();
7936        let mut payload_buf = [0; Self::ENCODED_LEN];
7937        let mut buf = if avail_len < Self::ENCODED_LEN {
7938            payload_buf[0..avail_len].copy_from_slice(__input);
7939            Bytes::new(&payload_buf)
7940        } else {
7941            Bytes::new(__input)
7942        };
7943        let mut __struct = Self::default();
7944        __struct.time_boot_ms = buf.get_u32_le();
7945        __struct.firmware_version = buf.get_u32_le();
7946        __struct.focal_length = buf.get_f32_le();
7947        __struct.sensor_size_h = buf.get_f32_le();
7948        __struct.sensor_size_v = buf.get_f32_le();
7949        let tmp = buf.get_u32_le();
7950        __struct.flags = CameraCapFlags::from_bits(tmp as <CameraCapFlags as Flags>::Bits).ok_or(
7951            ::mavlink_core::error::ParserError::InvalidFlag {
7952                flag_type: "CameraCapFlags",
7953                value: tmp as u64,
7954            },
7955        )?;
7956        __struct.resolution_h = buf.get_u16_le();
7957        __struct.resolution_v = buf.get_u16_le();
7958        __struct.cam_definition_version = buf.get_u16_le();
7959        for v in &mut __struct.vendor_name {
7960            let val = buf.get_u8();
7961            *v = val;
7962        }
7963        for v in &mut __struct.model_name {
7964            let val = buf.get_u8();
7965            *v = val;
7966        }
7967        __struct.lens_id = buf.get_u8();
7968        let mut tmp = [0_u8; 140usize];
7969        for v in &mut tmp {
7970            *v = buf.get_u8();
7971        }
7972        __struct.cam_definition_uri = CharArray::new(tmp);
7973        __struct.gimbal_device_id = buf.get_u8();
7974        __struct.camera_device_id = buf.get_u8();
7975        Ok(__struct)
7976    }
7977    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7978        let mut __tmp = BytesMut::new(bytes);
7979        #[allow(clippy::absurd_extreme_comparisons)]
7980        #[allow(unused_comparisons)]
7981        if __tmp.remaining() < Self::ENCODED_LEN {
7982            panic!(
7983                "buffer is too small (need {} bytes, but got {})",
7984                Self::ENCODED_LEN,
7985                __tmp.remaining(),
7986            )
7987        }
7988        __tmp.put_u32_le(self.time_boot_ms);
7989        __tmp.put_u32_le(self.firmware_version);
7990        __tmp.put_f32_le(self.focal_length);
7991        __tmp.put_f32_le(self.sensor_size_h);
7992        __tmp.put_f32_le(self.sensor_size_v);
7993        __tmp.put_u32_le(self.flags.bits() as u32);
7994        __tmp.put_u16_le(self.resolution_h);
7995        __tmp.put_u16_le(self.resolution_v);
7996        __tmp.put_u16_le(self.cam_definition_version);
7997        for val in &self.vendor_name {
7998            __tmp.put_u8(*val);
7999        }
8000        for val in &self.model_name {
8001            __tmp.put_u8(*val);
8002        }
8003        __tmp.put_u8(self.lens_id);
8004        for val in &self.cam_definition_uri {
8005            __tmp.put_u8(*val);
8006        }
8007        if matches!(version, MavlinkVersion::V2) {
8008            __tmp.put_u8(self.gimbal_device_id);
8009            __tmp.put_u8(self.camera_device_id);
8010            let len = __tmp.len();
8011            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8012        } else {
8013            __tmp.len()
8014        }
8015    }
8016}
8017#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
8018#[doc = ""]
8019#[doc = "ID: 260"]
8020#[derive(Debug, Clone, PartialEq)]
8021#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8022#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8023#[cfg_attr(feature = "ts", derive(TS))]
8024#[cfg_attr(feature = "ts", ts(export))]
8025pub struct CAMERA_SETTINGS_DATA {
8026    #[doc = "Timestamp (time since system boot)."]
8027    pub time_boot_ms: u32,
8028    #[doc = "Camera mode"]
8029    pub mode_id: CameraMode,
8030    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
8031    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8032    pub zoomLevel: f32,
8033    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
8034    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8035    pub focusLevel: f32,
8036    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8037    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8038    pub camera_device_id: u8,
8039}
8040impl CAMERA_SETTINGS_DATA {
8041    pub const ENCODED_LEN: usize = 14usize;
8042    pub const DEFAULT: Self = Self {
8043        time_boot_ms: 0_u32,
8044        mode_id: CameraMode::DEFAULT,
8045        zoomLevel: 0.0_f32,
8046        focusLevel: 0.0_f32,
8047        camera_device_id: 0_u8,
8048    };
8049    #[cfg(feature = "arbitrary")]
8050    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8051        use arbitrary::{Arbitrary, Unstructured};
8052        let mut buf = [0u8; 1024];
8053        rng.fill_bytes(&mut buf);
8054        let mut unstructured = Unstructured::new(&buf);
8055        Self::arbitrary(&mut unstructured).unwrap_or_default()
8056    }
8057}
8058impl Default for CAMERA_SETTINGS_DATA {
8059    fn default() -> Self {
8060        Self::DEFAULT.clone()
8061    }
8062}
8063impl MessageData for CAMERA_SETTINGS_DATA {
8064    type Message = MavMessage;
8065    const ID: u32 = 260u32;
8066    const NAME: &'static str = "CAMERA_SETTINGS";
8067    const EXTRA_CRC: u8 = 146u8;
8068    const ENCODED_LEN: usize = 14usize;
8069    fn deser(
8070        _version: MavlinkVersion,
8071        __input: &[u8],
8072    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8073        let avail_len = __input.len();
8074        let mut payload_buf = [0; Self::ENCODED_LEN];
8075        let mut buf = if avail_len < Self::ENCODED_LEN {
8076            payload_buf[0..avail_len].copy_from_slice(__input);
8077            Bytes::new(&payload_buf)
8078        } else {
8079            Bytes::new(__input)
8080        };
8081        let mut __struct = Self::default();
8082        __struct.time_boot_ms = buf.get_u32_le();
8083        let tmp = buf.get_u8();
8084        __struct.mode_id =
8085            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8086                enum_type: "CameraMode",
8087                value: tmp as u64,
8088            })?;
8089        __struct.zoomLevel = buf.get_f32_le();
8090        __struct.focusLevel = buf.get_f32_le();
8091        __struct.camera_device_id = buf.get_u8();
8092        Ok(__struct)
8093    }
8094    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8095        let mut __tmp = BytesMut::new(bytes);
8096        #[allow(clippy::absurd_extreme_comparisons)]
8097        #[allow(unused_comparisons)]
8098        if __tmp.remaining() < Self::ENCODED_LEN {
8099            panic!(
8100                "buffer is too small (need {} bytes, but got {})",
8101                Self::ENCODED_LEN,
8102                __tmp.remaining(),
8103            )
8104        }
8105        __tmp.put_u32_le(self.time_boot_ms);
8106        __tmp.put_u8(self.mode_id as u8);
8107        if matches!(version, MavlinkVersion::V2) {
8108            __tmp.put_f32_le(self.zoomLevel);
8109            __tmp.put_f32_le(self.focusLevel);
8110            __tmp.put_u8(self.camera_device_id);
8111            let len = __tmp.len();
8112            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8113        } else {
8114            __tmp.len()
8115        }
8116    }
8117}
8118#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
8119#[doc = ""]
8120#[doc = "ID: 277"]
8121#[derive(Debug, Clone, PartialEq)]
8122#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8123#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8124#[cfg_attr(feature = "ts", derive(TS))]
8125#[cfg_attr(feature = "ts", ts(export))]
8126pub struct CAMERA_THERMAL_RANGE_DATA {
8127    #[doc = "Timestamp (time since system boot)."]
8128    pub time_boot_ms: u32,
8129    #[doc = "Temperature max."]
8130    pub max: f32,
8131    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8132    pub max_point_x: f32,
8133    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8134    pub max_point_y: f32,
8135    #[doc = "Temperature min."]
8136    pub min: f32,
8137    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8138    pub min_point_x: f32,
8139    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8140    pub min_point_y: f32,
8141    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
8142    pub stream_id: u8,
8143    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8144    pub camera_device_id: u8,
8145}
8146impl CAMERA_THERMAL_RANGE_DATA {
8147    pub const ENCODED_LEN: usize = 30usize;
8148    pub const DEFAULT: Self = Self {
8149        time_boot_ms: 0_u32,
8150        max: 0.0_f32,
8151        max_point_x: 0.0_f32,
8152        max_point_y: 0.0_f32,
8153        min: 0.0_f32,
8154        min_point_x: 0.0_f32,
8155        min_point_y: 0.0_f32,
8156        stream_id: 0_u8,
8157        camera_device_id: 0_u8,
8158    };
8159    #[cfg(feature = "arbitrary")]
8160    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8161        use arbitrary::{Arbitrary, Unstructured};
8162        let mut buf = [0u8; 1024];
8163        rng.fill_bytes(&mut buf);
8164        let mut unstructured = Unstructured::new(&buf);
8165        Self::arbitrary(&mut unstructured).unwrap_or_default()
8166    }
8167}
8168impl Default for CAMERA_THERMAL_RANGE_DATA {
8169    fn default() -> Self {
8170        Self::DEFAULT.clone()
8171    }
8172}
8173impl MessageData for CAMERA_THERMAL_RANGE_DATA {
8174    type Message = MavMessage;
8175    const ID: u32 = 277u32;
8176    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
8177    const EXTRA_CRC: u8 = 62u8;
8178    const ENCODED_LEN: usize = 30usize;
8179    fn deser(
8180        _version: MavlinkVersion,
8181        __input: &[u8],
8182    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8183        let avail_len = __input.len();
8184        let mut payload_buf = [0; Self::ENCODED_LEN];
8185        let mut buf = if avail_len < Self::ENCODED_LEN {
8186            payload_buf[0..avail_len].copy_from_slice(__input);
8187            Bytes::new(&payload_buf)
8188        } else {
8189            Bytes::new(__input)
8190        };
8191        let mut __struct = Self::default();
8192        __struct.time_boot_ms = buf.get_u32_le();
8193        __struct.max = buf.get_f32_le();
8194        __struct.max_point_x = buf.get_f32_le();
8195        __struct.max_point_y = buf.get_f32_le();
8196        __struct.min = buf.get_f32_le();
8197        __struct.min_point_x = buf.get_f32_le();
8198        __struct.min_point_y = buf.get_f32_le();
8199        __struct.stream_id = buf.get_u8();
8200        __struct.camera_device_id = buf.get_u8();
8201        Ok(__struct)
8202    }
8203    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8204        let mut __tmp = BytesMut::new(bytes);
8205        #[allow(clippy::absurd_extreme_comparisons)]
8206        #[allow(unused_comparisons)]
8207        if __tmp.remaining() < Self::ENCODED_LEN {
8208            panic!(
8209                "buffer is too small (need {} bytes, but got {})",
8210                Self::ENCODED_LEN,
8211                __tmp.remaining(),
8212            )
8213        }
8214        __tmp.put_u32_le(self.time_boot_ms);
8215        __tmp.put_f32_le(self.max);
8216        __tmp.put_f32_le(self.max_point_x);
8217        __tmp.put_f32_le(self.max_point_y);
8218        __tmp.put_f32_le(self.min);
8219        __tmp.put_f32_le(self.min_point_x);
8220        __tmp.put_f32_le(self.min_point_y);
8221        __tmp.put_u8(self.stream_id);
8222        __tmp.put_u8(self.camera_device_id);
8223        if matches!(version, MavlinkVersion::V2) {
8224            let len = __tmp.len();
8225            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8226        } else {
8227            __tmp.len()
8228        }
8229    }
8230}
8231#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8232#[doc = ""]
8233#[doc = "ID: 276"]
8234#[derive(Debug, Clone, PartialEq)]
8235#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8236#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8237#[cfg_attr(feature = "ts", derive(TS))]
8238#[cfg_attr(feature = "ts", ts(export))]
8239pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
8240    #[doc = "Latitude of tracked object"]
8241    pub lat: i32,
8242    #[doc = "Longitude of tracked object"]
8243    pub lon: i32,
8244    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
8245    pub alt: f32,
8246    #[doc = "Horizontal accuracy. NAN if unknown"]
8247    pub h_acc: f32,
8248    #[doc = "Vertical accuracy. NAN if unknown"]
8249    pub v_acc: f32,
8250    #[doc = "North velocity of tracked object. NAN if unknown"]
8251    pub vel_n: f32,
8252    #[doc = "East velocity of tracked object. NAN if unknown"]
8253    pub vel_e: f32,
8254    #[doc = "Down velocity of tracked object. NAN if unknown"]
8255    pub vel_d: f32,
8256    #[doc = "Velocity accuracy. NAN if unknown"]
8257    pub vel_acc: f32,
8258    #[doc = "Distance between camera and tracked object. NAN if unknown"]
8259    pub dist: f32,
8260    #[doc = "Heading in radians, in NED. NAN if unknown"]
8261    pub hdg: f32,
8262    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
8263    pub hdg_acc: f32,
8264    #[doc = "Current tracking status"]
8265    pub tracking_status: CameraTrackingStatusFlags,
8266    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8267    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8268    pub camera_device_id: u8,
8269}
8270impl CAMERA_TRACKING_GEO_STATUS_DATA {
8271    pub const ENCODED_LEN: usize = 50usize;
8272    pub const DEFAULT: Self = Self {
8273        lat: 0_i32,
8274        lon: 0_i32,
8275        alt: 0.0_f32,
8276        h_acc: 0.0_f32,
8277        v_acc: 0.0_f32,
8278        vel_n: 0.0_f32,
8279        vel_e: 0.0_f32,
8280        vel_d: 0.0_f32,
8281        vel_acc: 0.0_f32,
8282        dist: 0.0_f32,
8283        hdg: 0.0_f32,
8284        hdg_acc: 0.0_f32,
8285        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8286        camera_device_id: 0_u8,
8287    };
8288    #[cfg(feature = "arbitrary")]
8289    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8290        use arbitrary::{Arbitrary, Unstructured};
8291        let mut buf = [0u8; 1024];
8292        rng.fill_bytes(&mut buf);
8293        let mut unstructured = Unstructured::new(&buf);
8294        Self::arbitrary(&mut unstructured).unwrap_or_default()
8295    }
8296}
8297impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
8298    fn default() -> Self {
8299        Self::DEFAULT.clone()
8300    }
8301}
8302impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
8303    type Message = MavMessage;
8304    const ID: u32 = 276u32;
8305    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
8306    const EXTRA_CRC: u8 = 18u8;
8307    const ENCODED_LEN: usize = 50usize;
8308    fn deser(
8309        _version: MavlinkVersion,
8310        __input: &[u8],
8311    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8312        let avail_len = __input.len();
8313        let mut payload_buf = [0; Self::ENCODED_LEN];
8314        let mut buf = if avail_len < Self::ENCODED_LEN {
8315            payload_buf[0..avail_len].copy_from_slice(__input);
8316            Bytes::new(&payload_buf)
8317        } else {
8318            Bytes::new(__input)
8319        };
8320        let mut __struct = Self::default();
8321        __struct.lat = buf.get_i32_le();
8322        __struct.lon = buf.get_i32_le();
8323        __struct.alt = buf.get_f32_le();
8324        __struct.h_acc = buf.get_f32_le();
8325        __struct.v_acc = buf.get_f32_le();
8326        __struct.vel_n = buf.get_f32_le();
8327        __struct.vel_e = buf.get_f32_le();
8328        __struct.vel_d = buf.get_f32_le();
8329        __struct.vel_acc = buf.get_f32_le();
8330        __struct.dist = buf.get_f32_le();
8331        __struct.hdg = buf.get_f32_le();
8332        __struct.hdg_acc = buf.get_f32_le();
8333        let tmp = buf.get_u8();
8334        __struct.tracking_status =
8335            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8336                enum_type: "CameraTrackingStatusFlags",
8337                value: tmp as u64,
8338            })?;
8339        __struct.camera_device_id = buf.get_u8();
8340        Ok(__struct)
8341    }
8342    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8343        let mut __tmp = BytesMut::new(bytes);
8344        #[allow(clippy::absurd_extreme_comparisons)]
8345        #[allow(unused_comparisons)]
8346        if __tmp.remaining() < Self::ENCODED_LEN {
8347            panic!(
8348                "buffer is too small (need {} bytes, but got {})",
8349                Self::ENCODED_LEN,
8350                __tmp.remaining(),
8351            )
8352        }
8353        __tmp.put_i32_le(self.lat);
8354        __tmp.put_i32_le(self.lon);
8355        __tmp.put_f32_le(self.alt);
8356        __tmp.put_f32_le(self.h_acc);
8357        __tmp.put_f32_le(self.v_acc);
8358        __tmp.put_f32_le(self.vel_n);
8359        __tmp.put_f32_le(self.vel_e);
8360        __tmp.put_f32_le(self.vel_d);
8361        __tmp.put_f32_le(self.vel_acc);
8362        __tmp.put_f32_le(self.dist);
8363        __tmp.put_f32_le(self.hdg);
8364        __tmp.put_f32_le(self.hdg_acc);
8365        __tmp.put_u8(self.tracking_status as u8);
8366        if matches!(version, MavlinkVersion::V2) {
8367            __tmp.put_u8(self.camera_device_id);
8368            let len = __tmp.len();
8369            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8370        } else {
8371            __tmp.len()
8372        }
8373    }
8374}
8375#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8376#[doc = ""]
8377#[doc = "ID: 275"]
8378#[derive(Debug, Clone, PartialEq)]
8379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8381#[cfg_attr(feature = "ts", derive(TS))]
8382#[cfg_attr(feature = "ts", ts(export))]
8383pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
8384    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8385    pub point_x: f32,
8386    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8387    pub point_y: f32,
8388    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
8389    pub radius: f32,
8390    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8391    pub rec_top_x: f32,
8392    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8393    pub rec_top_y: f32,
8394    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8395    pub rec_bottom_x: f32,
8396    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8397    pub rec_bottom_y: f32,
8398    #[doc = "Current tracking status"]
8399    pub tracking_status: CameraTrackingStatusFlags,
8400    #[doc = "Current tracking mode"]
8401    pub tracking_mode: CameraTrackingMode,
8402    #[doc = "Defines location of target data"]
8403    pub target_data: CameraTrackingTargetData,
8404    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8405    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8406    pub camera_device_id: u8,
8407}
8408impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
8409    pub const ENCODED_LEN: usize = 32usize;
8410    pub const DEFAULT: Self = Self {
8411        point_x: 0.0_f32,
8412        point_y: 0.0_f32,
8413        radius: 0.0_f32,
8414        rec_top_x: 0.0_f32,
8415        rec_top_y: 0.0_f32,
8416        rec_bottom_x: 0.0_f32,
8417        rec_bottom_y: 0.0_f32,
8418        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8419        tracking_mode: CameraTrackingMode::DEFAULT,
8420        target_data: CameraTrackingTargetData::DEFAULT,
8421        camera_device_id: 0_u8,
8422    };
8423    #[cfg(feature = "arbitrary")]
8424    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8425        use arbitrary::{Arbitrary, Unstructured};
8426        let mut buf = [0u8; 1024];
8427        rng.fill_bytes(&mut buf);
8428        let mut unstructured = Unstructured::new(&buf);
8429        Self::arbitrary(&mut unstructured).unwrap_or_default()
8430    }
8431}
8432impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8433    fn default() -> Self {
8434        Self::DEFAULT.clone()
8435    }
8436}
8437impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8438    type Message = MavMessage;
8439    const ID: u32 = 275u32;
8440    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
8441    const EXTRA_CRC: u8 = 126u8;
8442    const ENCODED_LEN: usize = 32usize;
8443    fn deser(
8444        _version: MavlinkVersion,
8445        __input: &[u8],
8446    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8447        let avail_len = __input.len();
8448        let mut payload_buf = [0; Self::ENCODED_LEN];
8449        let mut buf = if avail_len < Self::ENCODED_LEN {
8450            payload_buf[0..avail_len].copy_from_slice(__input);
8451            Bytes::new(&payload_buf)
8452        } else {
8453            Bytes::new(__input)
8454        };
8455        let mut __struct = Self::default();
8456        __struct.point_x = buf.get_f32_le();
8457        __struct.point_y = buf.get_f32_le();
8458        __struct.radius = buf.get_f32_le();
8459        __struct.rec_top_x = buf.get_f32_le();
8460        __struct.rec_top_y = buf.get_f32_le();
8461        __struct.rec_bottom_x = buf.get_f32_le();
8462        __struct.rec_bottom_y = buf.get_f32_le();
8463        let tmp = buf.get_u8();
8464        __struct.tracking_status =
8465            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8466                enum_type: "CameraTrackingStatusFlags",
8467                value: tmp as u64,
8468            })?;
8469        let tmp = buf.get_u8();
8470        __struct.tracking_mode =
8471            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8472                enum_type: "CameraTrackingMode",
8473                value: tmp as u64,
8474            })?;
8475        let tmp = buf.get_u8();
8476        __struct.target_data =
8477            CameraTrackingTargetData::from_bits(tmp as <CameraTrackingTargetData as Flags>::Bits)
8478                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8479                flag_type: "CameraTrackingTargetData",
8480                value: tmp as u64,
8481            })?;
8482        __struct.camera_device_id = buf.get_u8();
8483        Ok(__struct)
8484    }
8485    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8486        let mut __tmp = BytesMut::new(bytes);
8487        #[allow(clippy::absurd_extreme_comparisons)]
8488        #[allow(unused_comparisons)]
8489        if __tmp.remaining() < Self::ENCODED_LEN {
8490            panic!(
8491                "buffer is too small (need {} bytes, but got {})",
8492                Self::ENCODED_LEN,
8493                __tmp.remaining(),
8494            )
8495        }
8496        __tmp.put_f32_le(self.point_x);
8497        __tmp.put_f32_le(self.point_y);
8498        __tmp.put_f32_le(self.radius);
8499        __tmp.put_f32_le(self.rec_top_x);
8500        __tmp.put_f32_le(self.rec_top_y);
8501        __tmp.put_f32_le(self.rec_bottom_x);
8502        __tmp.put_f32_le(self.rec_bottom_y);
8503        __tmp.put_u8(self.tracking_status as u8);
8504        __tmp.put_u8(self.tracking_mode as u8);
8505        __tmp.put_u8(self.target_data.bits() as u8);
8506        if matches!(version, MavlinkVersion::V2) {
8507            __tmp.put_u8(self.camera_device_id);
8508            let len = __tmp.len();
8509            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8510        } else {
8511            __tmp.len()
8512        }
8513    }
8514}
8515#[doc = "Camera-IMU triggering and synchronisation message."]
8516#[doc = ""]
8517#[doc = "ID: 112"]
8518#[derive(Debug, Clone, PartialEq)]
8519#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8520#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8521#[cfg_attr(feature = "ts", derive(TS))]
8522#[cfg_attr(feature = "ts", ts(export))]
8523pub struct CAMERA_TRIGGER_DATA {
8524    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8525    pub time_usec: u64,
8526    #[doc = "Image frame sequence"]
8527    pub seq: u32,
8528}
8529impl CAMERA_TRIGGER_DATA {
8530    pub const ENCODED_LEN: usize = 12usize;
8531    pub const DEFAULT: Self = Self {
8532        time_usec: 0_u64,
8533        seq: 0_u32,
8534    };
8535    #[cfg(feature = "arbitrary")]
8536    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8537        use arbitrary::{Arbitrary, Unstructured};
8538        let mut buf = [0u8; 1024];
8539        rng.fill_bytes(&mut buf);
8540        let mut unstructured = Unstructured::new(&buf);
8541        Self::arbitrary(&mut unstructured).unwrap_or_default()
8542    }
8543}
8544impl Default for CAMERA_TRIGGER_DATA {
8545    fn default() -> Self {
8546        Self::DEFAULT.clone()
8547    }
8548}
8549impl MessageData for CAMERA_TRIGGER_DATA {
8550    type Message = MavMessage;
8551    const ID: u32 = 112u32;
8552    const NAME: &'static str = "CAMERA_TRIGGER";
8553    const EXTRA_CRC: u8 = 174u8;
8554    const ENCODED_LEN: usize = 12usize;
8555    fn deser(
8556        _version: MavlinkVersion,
8557        __input: &[u8],
8558    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8559        let avail_len = __input.len();
8560        let mut payload_buf = [0; Self::ENCODED_LEN];
8561        let mut buf = if avail_len < Self::ENCODED_LEN {
8562            payload_buf[0..avail_len].copy_from_slice(__input);
8563            Bytes::new(&payload_buf)
8564        } else {
8565            Bytes::new(__input)
8566        };
8567        let mut __struct = Self::default();
8568        __struct.time_usec = buf.get_u64_le();
8569        __struct.seq = buf.get_u32_le();
8570        Ok(__struct)
8571    }
8572    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8573        let mut __tmp = BytesMut::new(bytes);
8574        #[allow(clippy::absurd_extreme_comparisons)]
8575        #[allow(unused_comparisons)]
8576        if __tmp.remaining() < Self::ENCODED_LEN {
8577            panic!(
8578                "buffer is too small (need {} bytes, but got {})",
8579                Self::ENCODED_LEN,
8580                __tmp.remaining(),
8581            )
8582        }
8583        __tmp.put_u64_le(self.time_usec);
8584        __tmp.put_u32_le(self.seq);
8585        if matches!(version, MavlinkVersion::V2) {
8586            let len = __tmp.len();
8587            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8588        } else {
8589            __tmp.len()
8590        }
8591    }
8592}
8593#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8594#[doc = ""]
8595#[doc = "ID: 387"]
8596#[derive(Debug, Clone, PartialEq)]
8597#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8599#[cfg_attr(feature = "ts", derive(TS))]
8600#[cfg_attr(feature = "ts", ts(export))]
8601pub struct CANFD_FRAME_DATA {
8602    #[doc = "Frame ID"]
8603    pub id: u32,
8604    #[doc = "System ID."]
8605    pub target_system: u8,
8606    #[doc = "Component ID."]
8607    pub target_component: u8,
8608    #[doc = "bus number"]
8609    pub bus: u8,
8610    #[doc = "Frame length"]
8611    pub len: u8,
8612    #[doc = "Frame data"]
8613    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8614    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8615    pub data: [u8; 64],
8616}
8617impl CANFD_FRAME_DATA {
8618    pub const ENCODED_LEN: usize = 72usize;
8619    pub const DEFAULT: Self = Self {
8620        id: 0_u32,
8621        target_system: 0_u8,
8622        target_component: 0_u8,
8623        bus: 0_u8,
8624        len: 0_u8,
8625        data: [0_u8; 64usize],
8626    };
8627    #[cfg(feature = "arbitrary")]
8628    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8629        use arbitrary::{Arbitrary, Unstructured};
8630        let mut buf = [0u8; 1024];
8631        rng.fill_bytes(&mut buf);
8632        let mut unstructured = Unstructured::new(&buf);
8633        Self::arbitrary(&mut unstructured).unwrap_or_default()
8634    }
8635}
8636impl Default for CANFD_FRAME_DATA {
8637    fn default() -> Self {
8638        Self::DEFAULT.clone()
8639    }
8640}
8641impl MessageData for CANFD_FRAME_DATA {
8642    type Message = MavMessage;
8643    const ID: u32 = 387u32;
8644    const NAME: &'static str = "CANFD_FRAME";
8645    const EXTRA_CRC: u8 = 4u8;
8646    const ENCODED_LEN: usize = 72usize;
8647    fn deser(
8648        _version: MavlinkVersion,
8649        __input: &[u8],
8650    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8651        let avail_len = __input.len();
8652        let mut payload_buf = [0; Self::ENCODED_LEN];
8653        let mut buf = if avail_len < Self::ENCODED_LEN {
8654            payload_buf[0..avail_len].copy_from_slice(__input);
8655            Bytes::new(&payload_buf)
8656        } else {
8657            Bytes::new(__input)
8658        };
8659        let mut __struct = Self::default();
8660        __struct.id = buf.get_u32_le();
8661        __struct.target_system = buf.get_u8();
8662        __struct.target_component = buf.get_u8();
8663        __struct.bus = buf.get_u8();
8664        __struct.len = buf.get_u8();
8665        for v in &mut __struct.data {
8666            let val = buf.get_u8();
8667            *v = val;
8668        }
8669        Ok(__struct)
8670    }
8671    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8672        let mut __tmp = BytesMut::new(bytes);
8673        #[allow(clippy::absurd_extreme_comparisons)]
8674        #[allow(unused_comparisons)]
8675        if __tmp.remaining() < Self::ENCODED_LEN {
8676            panic!(
8677                "buffer is too small (need {} bytes, but got {})",
8678                Self::ENCODED_LEN,
8679                __tmp.remaining(),
8680            )
8681        }
8682        __tmp.put_u32_le(self.id);
8683        __tmp.put_u8(self.target_system);
8684        __tmp.put_u8(self.target_component);
8685        __tmp.put_u8(self.bus);
8686        __tmp.put_u8(self.len);
8687        for val in &self.data {
8688            __tmp.put_u8(*val);
8689        }
8690        if matches!(version, MavlinkVersion::V2) {
8691            let len = __tmp.len();
8692            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8693        } else {
8694            __tmp.len()
8695        }
8696    }
8697}
8698#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8699#[doc = ""]
8700#[doc = "ID: 388"]
8701#[derive(Debug, Clone, PartialEq)]
8702#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8704#[cfg_attr(feature = "ts", derive(TS))]
8705#[cfg_attr(feature = "ts", ts(export))]
8706pub struct CAN_FILTER_MODIFY_DATA {
8707    #[doc = "filter IDs, length num_ids"]
8708    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8709    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8710    pub ids: [u16; 16],
8711    #[doc = "System ID."]
8712    pub target_system: u8,
8713    #[doc = "Component ID."]
8714    pub target_component: u8,
8715    #[doc = "bus number"]
8716    pub bus: u8,
8717    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8718    pub operation: CanFilterOp,
8719    #[doc = "number of IDs in filter list"]
8720    pub num_ids: u8,
8721}
8722impl CAN_FILTER_MODIFY_DATA {
8723    pub const ENCODED_LEN: usize = 37usize;
8724    pub const DEFAULT: Self = Self {
8725        ids: [0_u16; 16usize],
8726        target_system: 0_u8,
8727        target_component: 0_u8,
8728        bus: 0_u8,
8729        operation: CanFilterOp::DEFAULT,
8730        num_ids: 0_u8,
8731    };
8732    #[cfg(feature = "arbitrary")]
8733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8734        use arbitrary::{Arbitrary, Unstructured};
8735        let mut buf = [0u8; 1024];
8736        rng.fill_bytes(&mut buf);
8737        let mut unstructured = Unstructured::new(&buf);
8738        Self::arbitrary(&mut unstructured).unwrap_or_default()
8739    }
8740}
8741impl Default for CAN_FILTER_MODIFY_DATA {
8742    fn default() -> Self {
8743        Self::DEFAULT.clone()
8744    }
8745}
8746impl MessageData for CAN_FILTER_MODIFY_DATA {
8747    type Message = MavMessage;
8748    const ID: u32 = 388u32;
8749    const NAME: &'static str = "CAN_FILTER_MODIFY";
8750    const EXTRA_CRC: u8 = 8u8;
8751    const ENCODED_LEN: usize = 37usize;
8752    fn deser(
8753        _version: MavlinkVersion,
8754        __input: &[u8],
8755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8756        let avail_len = __input.len();
8757        let mut payload_buf = [0; Self::ENCODED_LEN];
8758        let mut buf = if avail_len < Self::ENCODED_LEN {
8759            payload_buf[0..avail_len].copy_from_slice(__input);
8760            Bytes::new(&payload_buf)
8761        } else {
8762            Bytes::new(__input)
8763        };
8764        let mut __struct = Self::default();
8765        for v in &mut __struct.ids {
8766            let val = buf.get_u16_le();
8767            *v = val;
8768        }
8769        __struct.target_system = buf.get_u8();
8770        __struct.target_component = buf.get_u8();
8771        __struct.bus = buf.get_u8();
8772        let tmp = buf.get_u8();
8773        __struct.operation =
8774            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8775                enum_type: "CanFilterOp",
8776                value: tmp as u64,
8777            })?;
8778        __struct.num_ids = buf.get_u8();
8779        Ok(__struct)
8780    }
8781    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8782        let mut __tmp = BytesMut::new(bytes);
8783        #[allow(clippy::absurd_extreme_comparisons)]
8784        #[allow(unused_comparisons)]
8785        if __tmp.remaining() < Self::ENCODED_LEN {
8786            panic!(
8787                "buffer is too small (need {} bytes, but got {})",
8788                Self::ENCODED_LEN,
8789                __tmp.remaining(),
8790            )
8791        }
8792        for val in &self.ids {
8793            __tmp.put_u16_le(*val);
8794        }
8795        __tmp.put_u8(self.target_system);
8796        __tmp.put_u8(self.target_component);
8797        __tmp.put_u8(self.bus);
8798        __tmp.put_u8(self.operation as u8);
8799        __tmp.put_u8(self.num_ids);
8800        if matches!(version, MavlinkVersion::V2) {
8801            let len = __tmp.len();
8802            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8803        } else {
8804            __tmp.len()
8805        }
8806    }
8807}
8808#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8809#[doc = ""]
8810#[doc = "ID: 386"]
8811#[derive(Debug, Clone, PartialEq)]
8812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8814#[cfg_attr(feature = "ts", derive(TS))]
8815#[cfg_attr(feature = "ts", ts(export))]
8816pub struct CAN_FRAME_DATA {
8817    #[doc = "Frame ID"]
8818    pub id: u32,
8819    #[doc = "System ID."]
8820    pub target_system: u8,
8821    #[doc = "Component ID."]
8822    pub target_component: u8,
8823    #[doc = "Bus number"]
8824    pub bus: u8,
8825    #[doc = "Frame length"]
8826    pub len: u8,
8827    #[doc = "Frame data"]
8828    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8829    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8830    pub data: [u8; 8],
8831}
8832impl CAN_FRAME_DATA {
8833    pub const ENCODED_LEN: usize = 16usize;
8834    pub const DEFAULT: Self = Self {
8835        id: 0_u32,
8836        target_system: 0_u8,
8837        target_component: 0_u8,
8838        bus: 0_u8,
8839        len: 0_u8,
8840        data: [0_u8; 8usize],
8841    };
8842    #[cfg(feature = "arbitrary")]
8843    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8844        use arbitrary::{Arbitrary, Unstructured};
8845        let mut buf = [0u8; 1024];
8846        rng.fill_bytes(&mut buf);
8847        let mut unstructured = Unstructured::new(&buf);
8848        Self::arbitrary(&mut unstructured).unwrap_or_default()
8849    }
8850}
8851impl Default for CAN_FRAME_DATA {
8852    fn default() -> Self {
8853        Self::DEFAULT.clone()
8854    }
8855}
8856impl MessageData for CAN_FRAME_DATA {
8857    type Message = MavMessage;
8858    const ID: u32 = 386u32;
8859    const NAME: &'static str = "CAN_FRAME";
8860    const EXTRA_CRC: u8 = 132u8;
8861    const ENCODED_LEN: usize = 16usize;
8862    fn deser(
8863        _version: MavlinkVersion,
8864        __input: &[u8],
8865    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8866        let avail_len = __input.len();
8867        let mut payload_buf = [0; Self::ENCODED_LEN];
8868        let mut buf = if avail_len < Self::ENCODED_LEN {
8869            payload_buf[0..avail_len].copy_from_slice(__input);
8870            Bytes::new(&payload_buf)
8871        } else {
8872            Bytes::new(__input)
8873        };
8874        let mut __struct = Self::default();
8875        __struct.id = buf.get_u32_le();
8876        __struct.target_system = buf.get_u8();
8877        __struct.target_component = buf.get_u8();
8878        __struct.bus = buf.get_u8();
8879        __struct.len = buf.get_u8();
8880        for v in &mut __struct.data {
8881            let val = buf.get_u8();
8882            *v = val;
8883        }
8884        Ok(__struct)
8885    }
8886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8887        let mut __tmp = BytesMut::new(bytes);
8888        #[allow(clippy::absurd_extreme_comparisons)]
8889        #[allow(unused_comparisons)]
8890        if __tmp.remaining() < Self::ENCODED_LEN {
8891            panic!(
8892                "buffer is too small (need {} bytes, but got {})",
8893                Self::ENCODED_LEN,
8894                __tmp.remaining(),
8895            )
8896        }
8897        __tmp.put_u32_le(self.id);
8898        __tmp.put_u8(self.target_system);
8899        __tmp.put_u8(self.target_component);
8900        __tmp.put_u8(self.bus);
8901        __tmp.put_u8(self.len);
8902        for val in &self.data {
8903            __tmp.put_u8(*val);
8904        }
8905        if matches!(version, MavlinkVersion::V2) {
8906            let len = __tmp.len();
8907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8908        } else {
8909            __tmp.len()
8910        }
8911    }
8912}
8913#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8914#[doc = ""]
8915#[doc = "ID: 336"]
8916#[derive(Debug, Clone, PartialEq)]
8917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8919#[cfg_attr(feature = "ts", derive(TS))]
8920#[cfg_attr(feature = "ts", ts(export))]
8921pub struct CELLULAR_CONFIG_DATA {
8922    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8923    pub enable_lte: u8,
8924    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8925    pub enable_pin: u8,
8926    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8927    #[cfg_attr(feature = "ts", ts(type = "string"))]
8928    pub pin: CharArray<16>,
8929    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8930    #[cfg_attr(feature = "ts", ts(type = "string"))]
8931    pub new_pin: CharArray<16>,
8932    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8933    #[cfg_attr(feature = "ts", ts(type = "string"))]
8934    pub apn: CharArray<32>,
8935    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8936    #[cfg_attr(feature = "ts", ts(type = "string"))]
8937    pub puk: CharArray<16>,
8938    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8939    pub roaming: u8,
8940    #[doc = "Message acceptance response (sent back to GS)."]
8941    pub response: CellularConfigResponse,
8942}
8943impl CELLULAR_CONFIG_DATA {
8944    pub const ENCODED_LEN: usize = 84usize;
8945    pub const DEFAULT: Self = Self {
8946        enable_lte: 0_u8,
8947        enable_pin: 0_u8,
8948        pin: CharArray::new([0_u8; 16usize]),
8949        new_pin: CharArray::new([0_u8; 16usize]),
8950        apn: CharArray::new([0_u8; 32usize]),
8951        puk: CharArray::new([0_u8; 16usize]),
8952        roaming: 0_u8,
8953        response: CellularConfigResponse::DEFAULT,
8954    };
8955    #[cfg(feature = "arbitrary")]
8956    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8957        use arbitrary::{Arbitrary, Unstructured};
8958        let mut buf = [0u8; 1024];
8959        rng.fill_bytes(&mut buf);
8960        let mut unstructured = Unstructured::new(&buf);
8961        Self::arbitrary(&mut unstructured).unwrap_or_default()
8962    }
8963}
8964impl Default for CELLULAR_CONFIG_DATA {
8965    fn default() -> Self {
8966        Self::DEFAULT.clone()
8967    }
8968}
8969impl MessageData for CELLULAR_CONFIG_DATA {
8970    type Message = MavMessage;
8971    const ID: u32 = 336u32;
8972    const NAME: &'static str = "CELLULAR_CONFIG";
8973    const EXTRA_CRC: u8 = 245u8;
8974    const ENCODED_LEN: usize = 84usize;
8975    fn deser(
8976        _version: MavlinkVersion,
8977        __input: &[u8],
8978    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8979        let avail_len = __input.len();
8980        let mut payload_buf = [0; Self::ENCODED_LEN];
8981        let mut buf = if avail_len < Self::ENCODED_LEN {
8982            payload_buf[0..avail_len].copy_from_slice(__input);
8983            Bytes::new(&payload_buf)
8984        } else {
8985            Bytes::new(__input)
8986        };
8987        let mut __struct = Self::default();
8988        __struct.enable_lte = buf.get_u8();
8989        __struct.enable_pin = buf.get_u8();
8990        let mut tmp = [0_u8; 16usize];
8991        for v in &mut tmp {
8992            *v = buf.get_u8();
8993        }
8994        __struct.pin = CharArray::new(tmp);
8995        let mut tmp = [0_u8; 16usize];
8996        for v in &mut tmp {
8997            *v = buf.get_u8();
8998        }
8999        __struct.new_pin = CharArray::new(tmp);
9000        let mut tmp = [0_u8; 32usize];
9001        for v in &mut tmp {
9002            *v = buf.get_u8();
9003        }
9004        __struct.apn = CharArray::new(tmp);
9005        let mut tmp = [0_u8; 16usize];
9006        for v in &mut tmp {
9007            *v = buf.get_u8();
9008        }
9009        __struct.puk = CharArray::new(tmp);
9010        __struct.roaming = buf.get_u8();
9011        let tmp = buf.get_u8();
9012        __struct.response =
9013            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9014                enum_type: "CellularConfigResponse",
9015                value: tmp as u64,
9016            })?;
9017        Ok(__struct)
9018    }
9019    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9020        let mut __tmp = BytesMut::new(bytes);
9021        #[allow(clippy::absurd_extreme_comparisons)]
9022        #[allow(unused_comparisons)]
9023        if __tmp.remaining() < Self::ENCODED_LEN {
9024            panic!(
9025                "buffer is too small (need {} bytes, but got {})",
9026                Self::ENCODED_LEN,
9027                __tmp.remaining(),
9028            )
9029        }
9030        __tmp.put_u8(self.enable_lte);
9031        __tmp.put_u8(self.enable_pin);
9032        for val in &self.pin {
9033            __tmp.put_u8(*val);
9034        }
9035        for val in &self.new_pin {
9036            __tmp.put_u8(*val);
9037        }
9038        for val in &self.apn {
9039            __tmp.put_u8(*val);
9040        }
9041        for val in &self.puk {
9042            __tmp.put_u8(*val);
9043        }
9044        __tmp.put_u8(self.roaming);
9045        __tmp.put_u8(self.response as u8);
9046        if matches!(version, MavlinkVersion::V2) {
9047            let len = __tmp.len();
9048            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9049        } else {
9050            __tmp.len()
9051        }
9052    }
9053}
9054#[doc = "Report current used cellular network status."]
9055#[doc = ""]
9056#[doc = "ID: 334"]
9057#[derive(Debug, Clone, PartialEq)]
9058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9060#[cfg_attr(feature = "ts", derive(TS))]
9061#[cfg_attr(feature = "ts", ts(export))]
9062pub struct CELLULAR_STATUS_DATA {
9063    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
9064    pub mcc: u16,
9065    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
9066    pub mnc: u16,
9067    #[doc = "Location area code. If unknown, set to 0"]
9068    pub lac: u16,
9069    #[doc = "Cellular modem status"]
9070    pub status: CellularStatusFlag,
9071    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
9072    pub failure_reason: CellularNetworkFailedReason,
9073    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
9074    pub mavtype: CellularNetworkRadioType,
9075    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
9076    pub quality: u8,
9077}
9078impl CELLULAR_STATUS_DATA {
9079    pub const ENCODED_LEN: usize = 10usize;
9080    pub const DEFAULT: Self = Self {
9081        mcc: 0_u16,
9082        mnc: 0_u16,
9083        lac: 0_u16,
9084        status: CellularStatusFlag::DEFAULT,
9085        failure_reason: CellularNetworkFailedReason::DEFAULT,
9086        mavtype: CellularNetworkRadioType::DEFAULT,
9087        quality: 0_u8,
9088    };
9089    #[cfg(feature = "arbitrary")]
9090    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9091        use arbitrary::{Arbitrary, Unstructured};
9092        let mut buf = [0u8; 1024];
9093        rng.fill_bytes(&mut buf);
9094        let mut unstructured = Unstructured::new(&buf);
9095        Self::arbitrary(&mut unstructured).unwrap_or_default()
9096    }
9097}
9098impl Default for CELLULAR_STATUS_DATA {
9099    fn default() -> Self {
9100        Self::DEFAULT.clone()
9101    }
9102}
9103impl MessageData for CELLULAR_STATUS_DATA {
9104    type Message = MavMessage;
9105    const ID: u32 = 334u32;
9106    const NAME: &'static str = "CELLULAR_STATUS";
9107    const EXTRA_CRC: u8 = 72u8;
9108    const ENCODED_LEN: usize = 10usize;
9109    fn deser(
9110        _version: MavlinkVersion,
9111        __input: &[u8],
9112    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9113        let avail_len = __input.len();
9114        let mut payload_buf = [0; Self::ENCODED_LEN];
9115        let mut buf = if avail_len < Self::ENCODED_LEN {
9116            payload_buf[0..avail_len].copy_from_slice(__input);
9117            Bytes::new(&payload_buf)
9118        } else {
9119            Bytes::new(__input)
9120        };
9121        let mut __struct = Self::default();
9122        __struct.mcc = buf.get_u16_le();
9123        __struct.mnc = buf.get_u16_le();
9124        __struct.lac = buf.get_u16_le();
9125        let tmp = buf.get_u8();
9126        __struct.status =
9127            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9128                enum_type: "CellularStatusFlag",
9129                value: tmp as u64,
9130            })?;
9131        let tmp = buf.get_u8();
9132        __struct.failure_reason =
9133            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9134                enum_type: "CellularNetworkFailedReason",
9135                value: tmp as u64,
9136            })?;
9137        let tmp = buf.get_u8();
9138        __struct.mavtype =
9139            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9140                enum_type: "CellularNetworkRadioType",
9141                value: tmp as u64,
9142            })?;
9143        __struct.quality = buf.get_u8();
9144        Ok(__struct)
9145    }
9146    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9147        let mut __tmp = BytesMut::new(bytes);
9148        #[allow(clippy::absurd_extreme_comparisons)]
9149        #[allow(unused_comparisons)]
9150        if __tmp.remaining() < Self::ENCODED_LEN {
9151            panic!(
9152                "buffer is too small (need {} bytes, but got {})",
9153                Self::ENCODED_LEN,
9154                __tmp.remaining(),
9155            )
9156        }
9157        __tmp.put_u16_le(self.mcc);
9158        __tmp.put_u16_le(self.mnc);
9159        __tmp.put_u16_le(self.lac);
9160        __tmp.put_u8(self.status as u8);
9161        __tmp.put_u8(self.failure_reason as u8);
9162        __tmp.put_u8(self.mavtype as u8);
9163        __tmp.put_u8(self.quality);
9164        if matches!(version, MavlinkVersion::V2) {
9165            let len = __tmp.len();
9166            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9167        } else {
9168            __tmp.len()
9169        }
9170    }
9171}
9172#[doc = "Request to control this MAV."]
9173#[doc = ""]
9174#[doc = "ID: 5"]
9175#[derive(Debug, Clone, PartialEq)]
9176#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9177#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9178#[cfg_attr(feature = "ts", derive(TS))]
9179#[cfg_attr(feature = "ts", ts(export))]
9180pub struct CHANGE_OPERATOR_CONTROL_DATA {
9181    #[doc = "System the GCS requests control for"]
9182    pub target_system: u8,
9183    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9184    pub control_request: u8,
9185    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
9186    pub version: u8,
9187    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
9188    #[cfg_attr(feature = "ts", ts(type = "string"))]
9189    pub passkey: CharArray<25>,
9190}
9191impl CHANGE_OPERATOR_CONTROL_DATA {
9192    pub const ENCODED_LEN: usize = 28usize;
9193    pub const DEFAULT: Self = Self {
9194        target_system: 0_u8,
9195        control_request: 0_u8,
9196        version: 0_u8,
9197        passkey: CharArray::new([0_u8; 25usize]),
9198    };
9199    #[cfg(feature = "arbitrary")]
9200    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9201        use arbitrary::{Arbitrary, Unstructured};
9202        let mut buf = [0u8; 1024];
9203        rng.fill_bytes(&mut buf);
9204        let mut unstructured = Unstructured::new(&buf);
9205        Self::arbitrary(&mut unstructured).unwrap_or_default()
9206    }
9207}
9208impl Default for CHANGE_OPERATOR_CONTROL_DATA {
9209    fn default() -> Self {
9210        Self::DEFAULT.clone()
9211    }
9212}
9213impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
9214    type Message = MavMessage;
9215    const ID: u32 = 5u32;
9216    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
9217    const EXTRA_CRC: u8 = 217u8;
9218    const ENCODED_LEN: usize = 28usize;
9219    fn deser(
9220        _version: MavlinkVersion,
9221        __input: &[u8],
9222    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9223        let avail_len = __input.len();
9224        let mut payload_buf = [0; Self::ENCODED_LEN];
9225        let mut buf = if avail_len < Self::ENCODED_LEN {
9226            payload_buf[0..avail_len].copy_from_slice(__input);
9227            Bytes::new(&payload_buf)
9228        } else {
9229            Bytes::new(__input)
9230        };
9231        let mut __struct = Self::default();
9232        __struct.target_system = buf.get_u8();
9233        __struct.control_request = buf.get_u8();
9234        __struct.version = buf.get_u8();
9235        let mut tmp = [0_u8; 25usize];
9236        for v in &mut tmp {
9237            *v = buf.get_u8();
9238        }
9239        __struct.passkey = CharArray::new(tmp);
9240        Ok(__struct)
9241    }
9242    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9243        let mut __tmp = BytesMut::new(bytes);
9244        #[allow(clippy::absurd_extreme_comparisons)]
9245        #[allow(unused_comparisons)]
9246        if __tmp.remaining() < Self::ENCODED_LEN {
9247            panic!(
9248                "buffer is too small (need {} bytes, but got {})",
9249                Self::ENCODED_LEN,
9250                __tmp.remaining(),
9251            )
9252        }
9253        __tmp.put_u8(self.target_system);
9254        __tmp.put_u8(self.control_request);
9255        __tmp.put_u8(self.version);
9256        for val in &self.passkey {
9257            __tmp.put_u8(*val);
9258        }
9259        if matches!(version, MavlinkVersion::V2) {
9260            let len = __tmp.len();
9261            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9262        } else {
9263            __tmp.len()
9264        }
9265    }
9266}
9267#[doc = "Accept / deny control of this MAV."]
9268#[doc = ""]
9269#[doc = "ID: 6"]
9270#[derive(Debug, Clone, PartialEq)]
9271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9273#[cfg_attr(feature = "ts", derive(TS))]
9274#[cfg_attr(feature = "ts", ts(export))]
9275pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
9276    #[doc = "ID of the GCS this message"]
9277    pub gcs_system_id: u8,
9278    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9279    pub control_request: u8,
9280    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
9281    pub ack: u8,
9282}
9283impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
9284    pub const ENCODED_LEN: usize = 3usize;
9285    pub const DEFAULT: Self = Self {
9286        gcs_system_id: 0_u8,
9287        control_request: 0_u8,
9288        ack: 0_u8,
9289    };
9290    #[cfg(feature = "arbitrary")]
9291    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9292        use arbitrary::{Arbitrary, Unstructured};
9293        let mut buf = [0u8; 1024];
9294        rng.fill_bytes(&mut buf);
9295        let mut unstructured = Unstructured::new(&buf);
9296        Self::arbitrary(&mut unstructured).unwrap_or_default()
9297    }
9298}
9299impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9300    fn default() -> Self {
9301        Self::DEFAULT.clone()
9302    }
9303}
9304impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9305    type Message = MavMessage;
9306    const ID: u32 = 6u32;
9307    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
9308    const EXTRA_CRC: u8 = 104u8;
9309    const ENCODED_LEN: usize = 3usize;
9310    fn deser(
9311        _version: MavlinkVersion,
9312        __input: &[u8],
9313    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9314        let avail_len = __input.len();
9315        let mut payload_buf = [0; Self::ENCODED_LEN];
9316        let mut buf = if avail_len < Self::ENCODED_LEN {
9317            payload_buf[0..avail_len].copy_from_slice(__input);
9318            Bytes::new(&payload_buf)
9319        } else {
9320            Bytes::new(__input)
9321        };
9322        let mut __struct = Self::default();
9323        __struct.gcs_system_id = buf.get_u8();
9324        __struct.control_request = buf.get_u8();
9325        __struct.ack = buf.get_u8();
9326        Ok(__struct)
9327    }
9328    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9329        let mut __tmp = BytesMut::new(bytes);
9330        #[allow(clippy::absurd_extreme_comparisons)]
9331        #[allow(unused_comparisons)]
9332        if __tmp.remaining() < Self::ENCODED_LEN {
9333            panic!(
9334                "buffer is too small (need {} bytes, but got {})",
9335                Self::ENCODED_LEN,
9336                __tmp.remaining(),
9337            )
9338        }
9339        __tmp.put_u8(self.gcs_system_id);
9340        __tmp.put_u8(self.control_request);
9341        __tmp.put_u8(self.ack);
9342        if matches!(version, MavlinkVersion::V2) {
9343            let len = __tmp.len();
9344            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9345        } else {
9346            __tmp.len()
9347        }
9348    }
9349}
9350#[doc = "Information about a potential collision."]
9351#[doc = ""]
9352#[doc = "ID: 247"]
9353#[derive(Debug, Clone, PartialEq)]
9354#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9355#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9356#[cfg_attr(feature = "ts", derive(TS))]
9357#[cfg_attr(feature = "ts", ts(export))]
9358pub struct COLLISION_DATA {
9359    #[doc = "Unique identifier, domain based on src field"]
9360    pub id: u32,
9361    #[doc = "Estimated time until collision occurs"]
9362    pub time_to_minimum_delta: f32,
9363    #[doc = "Closest vertical distance between vehicle and object"]
9364    pub altitude_minimum_delta: f32,
9365    #[doc = "Closest horizontal distance between vehicle and object"]
9366    pub horizontal_minimum_delta: f32,
9367    #[doc = "Collision data source"]
9368    pub src: MavCollisionSrc,
9369    #[doc = "Action that is being taken to avoid this collision"]
9370    pub action: MavCollisionAction,
9371    #[doc = "How concerned the aircraft is about this collision"]
9372    pub threat_level: MavCollisionThreatLevel,
9373}
9374impl COLLISION_DATA {
9375    pub const ENCODED_LEN: usize = 19usize;
9376    pub const DEFAULT: Self = Self {
9377        id: 0_u32,
9378        time_to_minimum_delta: 0.0_f32,
9379        altitude_minimum_delta: 0.0_f32,
9380        horizontal_minimum_delta: 0.0_f32,
9381        src: MavCollisionSrc::DEFAULT,
9382        action: MavCollisionAction::DEFAULT,
9383        threat_level: MavCollisionThreatLevel::DEFAULT,
9384    };
9385    #[cfg(feature = "arbitrary")]
9386    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9387        use arbitrary::{Arbitrary, Unstructured};
9388        let mut buf = [0u8; 1024];
9389        rng.fill_bytes(&mut buf);
9390        let mut unstructured = Unstructured::new(&buf);
9391        Self::arbitrary(&mut unstructured).unwrap_or_default()
9392    }
9393}
9394impl Default for COLLISION_DATA {
9395    fn default() -> Self {
9396        Self::DEFAULT.clone()
9397    }
9398}
9399impl MessageData for COLLISION_DATA {
9400    type Message = MavMessage;
9401    const ID: u32 = 247u32;
9402    const NAME: &'static str = "COLLISION";
9403    const EXTRA_CRC: u8 = 81u8;
9404    const ENCODED_LEN: usize = 19usize;
9405    fn deser(
9406        _version: MavlinkVersion,
9407        __input: &[u8],
9408    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9409        let avail_len = __input.len();
9410        let mut payload_buf = [0; Self::ENCODED_LEN];
9411        let mut buf = if avail_len < Self::ENCODED_LEN {
9412            payload_buf[0..avail_len].copy_from_slice(__input);
9413            Bytes::new(&payload_buf)
9414        } else {
9415            Bytes::new(__input)
9416        };
9417        let mut __struct = Self::default();
9418        __struct.id = buf.get_u32_le();
9419        __struct.time_to_minimum_delta = buf.get_f32_le();
9420        __struct.altitude_minimum_delta = buf.get_f32_le();
9421        __struct.horizontal_minimum_delta = buf.get_f32_le();
9422        let tmp = buf.get_u8();
9423        __struct.src =
9424            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9425                enum_type: "MavCollisionSrc",
9426                value: tmp as u64,
9427            })?;
9428        let tmp = buf.get_u8();
9429        __struct.action =
9430            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9431                enum_type: "MavCollisionAction",
9432                value: tmp as u64,
9433            })?;
9434        let tmp = buf.get_u8();
9435        __struct.threat_level =
9436            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9437                enum_type: "MavCollisionThreatLevel",
9438                value: tmp as u64,
9439            })?;
9440        Ok(__struct)
9441    }
9442    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9443        let mut __tmp = BytesMut::new(bytes);
9444        #[allow(clippy::absurd_extreme_comparisons)]
9445        #[allow(unused_comparisons)]
9446        if __tmp.remaining() < Self::ENCODED_LEN {
9447            panic!(
9448                "buffer is too small (need {} bytes, but got {})",
9449                Self::ENCODED_LEN,
9450                __tmp.remaining(),
9451            )
9452        }
9453        __tmp.put_u32_le(self.id);
9454        __tmp.put_f32_le(self.time_to_minimum_delta);
9455        __tmp.put_f32_le(self.altitude_minimum_delta);
9456        __tmp.put_f32_le(self.horizontal_minimum_delta);
9457        __tmp.put_u8(self.src as u8);
9458        __tmp.put_u8(self.action as u8);
9459        __tmp.put_u8(self.threat_level as u8);
9460        if matches!(version, MavlinkVersion::V2) {
9461            let len = __tmp.len();
9462            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9463        } else {
9464            __tmp.len()
9465        }
9466    }
9467}
9468#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9469#[doc = ""]
9470#[doc = "ID: 77"]
9471#[derive(Debug, Clone, PartialEq)]
9472#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9473#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9474#[cfg_attr(feature = "ts", derive(TS))]
9475#[cfg_attr(feature = "ts", ts(export))]
9476pub struct COMMAND_ACK_DATA {
9477    #[doc = "Command ID (of acknowledged command)."]
9478    pub command: MavCmd,
9479    #[doc = "Result of command."]
9480    pub result: MavResult,
9481    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9482    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9483    pub progress: u8,
9484    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9485    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9486    pub result_param2: i32,
9487    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9488    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9489    pub target_system: u8,
9490    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9491    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9492    pub target_component: u8,
9493}
9494impl COMMAND_ACK_DATA {
9495    pub const ENCODED_LEN: usize = 10usize;
9496    pub const DEFAULT: Self = Self {
9497        command: MavCmd::DEFAULT,
9498        result: MavResult::DEFAULT,
9499        progress: 0_u8,
9500        result_param2: 0_i32,
9501        target_system: 0_u8,
9502        target_component: 0_u8,
9503    };
9504    #[cfg(feature = "arbitrary")]
9505    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9506        use arbitrary::{Arbitrary, Unstructured};
9507        let mut buf = [0u8; 1024];
9508        rng.fill_bytes(&mut buf);
9509        let mut unstructured = Unstructured::new(&buf);
9510        Self::arbitrary(&mut unstructured).unwrap_or_default()
9511    }
9512}
9513impl Default for COMMAND_ACK_DATA {
9514    fn default() -> Self {
9515        Self::DEFAULT.clone()
9516    }
9517}
9518impl MessageData for COMMAND_ACK_DATA {
9519    type Message = MavMessage;
9520    const ID: u32 = 77u32;
9521    const NAME: &'static str = "COMMAND_ACK";
9522    const EXTRA_CRC: u8 = 143u8;
9523    const ENCODED_LEN: usize = 10usize;
9524    fn deser(
9525        _version: MavlinkVersion,
9526        __input: &[u8],
9527    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9528        let avail_len = __input.len();
9529        let mut payload_buf = [0; Self::ENCODED_LEN];
9530        let mut buf = if avail_len < Self::ENCODED_LEN {
9531            payload_buf[0..avail_len].copy_from_slice(__input);
9532            Bytes::new(&payload_buf)
9533        } else {
9534            Bytes::new(__input)
9535        };
9536        let mut __struct = Self::default();
9537        let tmp = buf.get_u16_le();
9538        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9539            ::mavlink_core::error::ParserError::InvalidEnum {
9540                enum_type: "MavCmd",
9541                value: tmp as u64,
9542            },
9543        )?;
9544        let tmp = buf.get_u8();
9545        __struct.result =
9546            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9547                enum_type: "MavResult",
9548                value: tmp as u64,
9549            })?;
9550        __struct.progress = buf.get_u8();
9551        __struct.result_param2 = buf.get_i32_le();
9552        __struct.target_system = buf.get_u8();
9553        __struct.target_component = buf.get_u8();
9554        Ok(__struct)
9555    }
9556    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9557        let mut __tmp = BytesMut::new(bytes);
9558        #[allow(clippy::absurd_extreme_comparisons)]
9559        #[allow(unused_comparisons)]
9560        if __tmp.remaining() < Self::ENCODED_LEN {
9561            panic!(
9562                "buffer is too small (need {} bytes, but got {})",
9563                Self::ENCODED_LEN,
9564                __tmp.remaining(),
9565            )
9566        }
9567        __tmp.put_u16_le(self.command as u16);
9568        __tmp.put_u8(self.result as u8);
9569        if matches!(version, MavlinkVersion::V2) {
9570            __tmp.put_u8(self.progress);
9571            __tmp.put_i32_le(self.result_param2);
9572            __tmp.put_u8(self.target_system);
9573            __tmp.put_u8(self.target_component);
9574            let len = __tmp.len();
9575            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9576        } else {
9577            __tmp.len()
9578        }
9579    }
9580}
9581#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9582#[doc = ""]
9583#[doc = "ID: 80"]
9584#[derive(Debug, Clone, PartialEq)]
9585#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9587#[cfg_attr(feature = "ts", derive(TS))]
9588#[cfg_attr(feature = "ts", ts(export))]
9589pub struct COMMAND_CANCEL_DATA {
9590    #[doc = "Command ID (of command to cancel)."]
9591    pub command: MavCmd,
9592    #[doc = "System executing long running command. Should not be broadcast (0)."]
9593    pub target_system: u8,
9594    #[doc = "Component executing long running command."]
9595    pub target_component: u8,
9596}
9597impl COMMAND_CANCEL_DATA {
9598    pub const ENCODED_LEN: usize = 4usize;
9599    pub const DEFAULT: Self = Self {
9600        command: MavCmd::DEFAULT,
9601        target_system: 0_u8,
9602        target_component: 0_u8,
9603    };
9604    #[cfg(feature = "arbitrary")]
9605    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9606        use arbitrary::{Arbitrary, Unstructured};
9607        let mut buf = [0u8; 1024];
9608        rng.fill_bytes(&mut buf);
9609        let mut unstructured = Unstructured::new(&buf);
9610        Self::arbitrary(&mut unstructured).unwrap_or_default()
9611    }
9612}
9613impl Default for COMMAND_CANCEL_DATA {
9614    fn default() -> Self {
9615        Self::DEFAULT.clone()
9616    }
9617}
9618impl MessageData for COMMAND_CANCEL_DATA {
9619    type Message = MavMessage;
9620    const ID: u32 = 80u32;
9621    const NAME: &'static str = "COMMAND_CANCEL";
9622    const EXTRA_CRC: u8 = 14u8;
9623    const ENCODED_LEN: usize = 4usize;
9624    fn deser(
9625        _version: MavlinkVersion,
9626        __input: &[u8],
9627    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9628        let avail_len = __input.len();
9629        let mut payload_buf = [0; Self::ENCODED_LEN];
9630        let mut buf = if avail_len < Self::ENCODED_LEN {
9631            payload_buf[0..avail_len].copy_from_slice(__input);
9632            Bytes::new(&payload_buf)
9633        } else {
9634            Bytes::new(__input)
9635        };
9636        let mut __struct = Self::default();
9637        let tmp = buf.get_u16_le();
9638        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9639            ::mavlink_core::error::ParserError::InvalidEnum {
9640                enum_type: "MavCmd",
9641                value: tmp as u64,
9642            },
9643        )?;
9644        __struct.target_system = buf.get_u8();
9645        __struct.target_component = buf.get_u8();
9646        Ok(__struct)
9647    }
9648    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9649        let mut __tmp = BytesMut::new(bytes);
9650        #[allow(clippy::absurd_extreme_comparisons)]
9651        #[allow(unused_comparisons)]
9652        if __tmp.remaining() < Self::ENCODED_LEN {
9653            panic!(
9654                "buffer is too small (need {} bytes, but got {})",
9655                Self::ENCODED_LEN,
9656                __tmp.remaining(),
9657            )
9658        }
9659        __tmp.put_u16_le(self.command as u16);
9660        __tmp.put_u8(self.target_system);
9661        __tmp.put_u8(self.target_component);
9662        if matches!(version, MavlinkVersion::V2) {
9663            let len = __tmp.len();
9664            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9665        } else {
9666            __tmp.len()
9667        }
9668    }
9669}
9670#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9671#[doc = ""]
9672#[doc = "ID: 75"]
9673#[derive(Debug, Clone, PartialEq)]
9674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9676#[cfg_attr(feature = "ts", derive(TS))]
9677#[cfg_attr(feature = "ts", ts(export))]
9678pub struct COMMAND_INT_DATA {
9679    #[doc = "PARAM1, see MAV_CMD enum"]
9680    pub param1: f32,
9681    #[doc = "PARAM2, see MAV_CMD enum"]
9682    pub param2: f32,
9683    #[doc = "PARAM3, see MAV_CMD enum"]
9684    pub param3: f32,
9685    #[doc = "PARAM4, see MAV_CMD enum"]
9686    pub param4: f32,
9687    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9688    pub x: i32,
9689    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9690    pub y: i32,
9691    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9692    pub z: f32,
9693    #[doc = "The scheduled action for the mission item."]
9694    pub command: MavCmd,
9695    #[doc = "System ID"]
9696    pub target_system: u8,
9697    #[doc = "Component ID"]
9698    pub target_component: u8,
9699    #[doc = "The coordinate system of the COMMAND."]
9700    pub frame: MavFrame,
9701    #[doc = "Not used."]
9702    pub current: u8,
9703    #[doc = "Not used (set 0)."]
9704    pub autocontinue: u8,
9705}
9706impl COMMAND_INT_DATA {
9707    pub const ENCODED_LEN: usize = 35usize;
9708    pub const DEFAULT: Self = Self {
9709        param1: 0.0_f32,
9710        param2: 0.0_f32,
9711        param3: 0.0_f32,
9712        param4: 0.0_f32,
9713        x: 0_i32,
9714        y: 0_i32,
9715        z: 0.0_f32,
9716        command: MavCmd::DEFAULT,
9717        target_system: 0_u8,
9718        target_component: 0_u8,
9719        frame: MavFrame::DEFAULT,
9720        current: 0_u8,
9721        autocontinue: 0_u8,
9722    };
9723    #[cfg(feature = "arbitrary")]
9724    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9725        use arbitrary::{Arbitrary, Unstructured};
9726        let mut buf = [0u8; 1024];
9727        rng.fill_bytes(&mut buf);
9728        let mut unstructured = Unstructured::new(&buf);
9729        Self::arbitrary(&mut unstructured).unwrap_or_default()
9730    }
9731}
9732impl Default for COMMAND_INT_DATA {
9733    fn default() -> Self {
9734        Self::DEFAULT.clone()
9735    }
9736}
9737impl MessageData for COMMAND_INT_DATA {
9738    type Message = MavMessage;
9739    const ID: u32 = 75u32;
9740    const NAME: &'static str = "COMMAND_INT";
9741    const EXTRA_CRC: u8 = 158u8;
9742    const ENCODED_LEN: usize = 35usize;
9743    fn deser(
9744        _version: MavlinkVersion,
9745        __input: &[u8],
9746    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9747        let avail_len = __input.len();
9748        let mut payload_buf = [0; Self::ENCODED_LEN];
9749        let mut buf = if avail_len < Self::ENCODED_LEN {
9750            payload_buf[0..avail_len].copy_from_slice(__input);
9751            Bytes::new(&payload_buf)
9752        } else {
9753            Bytes::new(__input)
9754        };
9755        let mut __struct = Self::default();
9756        __struct.param1 = buf.get_f32_le();
9757        __struct.param2 = buf.get_f32_le();
9758        __struct.param3 = buf.get_f32_le();
9759        __struct.param4 = buf.get_f32_le();
9760        __struct.x = buf.get_i32_le();
9761        __struct.y = buf.get_i32_le();
9762        __struct.z = buf.get_f32_le();
9763        let tmp = buf.get_u16_le();
9764        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9765            ::mavlink_core::error::ParserError::InvalidEnum {
9766                enum_type: "MavCmd",
9767                value: tmp as u64,
9768            },
9769        )?;
9770        __struct.target_system = buf.get_u8();
9771        __struct.target_component = buf.get_u8();
9772        let tmp = buf.get_u8();
9773        __struct.frame =
9774            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9775                enum_type: "MavFrame",
9776                value: tmp as u64,
9777            })?;
9778        __struct.current = buf.get_u8();
9779        __struct.autocontinue = buf.get_u8();
9780        Ok(__struct)
9781    }
9782    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9783        let mut __tmp = BytesMut::new(bytes);
9784        #[allow(clippy::absurd_extreme_comparisons)]
9785        #[allow(unused_comparisons)]
9786        if __tmp.remaining() < Self::ENCODED_LEN {
9787            panic!(
9788                "buffer is too small (need {} bytes, but got {})",
9789                Self::ENCODED_LEN,
9790                __tmp.remaining(),
9791            )
9792        }
9793        __tmp.put_f32_le(self.param1);
9794        __tmp.put_f32_le(self.param2);
9795        __tmp.put_f32_le(self.param3);
9796        __tmp.put_f32_le(self.param4);
9797        __tmp.put_i32_le(self.x);
9798        __tmp.put_i32_le(self.y);
9799        __tmp.put_f32_le(self.z);
9800        __tmp.put_u16_le(self.command as u16);
9801        __tmp.put_u8(self.target_system);
9802        __tmp.put_u8(self.target_component);
9803        __tmp.put_u8(self.frame as u8);
9804        __tmp.put_u8(self.current);
9805        __tmp.put_u8(self.autocontinue);
9806        if matches!(version, MavlinkVersion::V2) {
9807            let len = __tmp.len();
9808            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9809        } else {
9810            __tmp.len()
9811        }
9812    }
9813}
9814#[doc = "Message encoding a command with parameters as scaled integers and additional metadata. Scaling depends on the actual command value."]
9815#[doc = ""]
9816#[doc = "ID: 223"]
9817#[derive(Debug, Clone, PartialEq)]
9818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9819#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9820#[cfg_attr(feature = "ts", derive(TS))]
9821#[cfg_attr(feature = "ts", ts(export))]
9822pub struct COMMAND_INT_STAMPED_DATA {
9823    #[doc = "Microseconds elapsed since vehicle boot"]
9824    pub vehicle_timestamp: u64,
9825    #[doc = "UTC time, seconds elapsed since 01.01.1970"]
9826    pub utc_time: u32,
9827    #[doc = "PARAM1, see MAV_CMD enum"]
9828    pub param1: f32,
9829    #[doc = "PARAM2, see MAV_CMD enum"]
9830    pub param2: f32,
9831    #[doc = "PARAM3, see MAV_CMD enum"]
9832    pub param3: f32,
9833    #[doc = "PARAM4, see MAV_CMD enum"]
9834    pub param4: f32,
9835    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9836    pub x: i32,
9837    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9838    pub y: i32,
9839    #[doc = "PARAM7 / z position: global: altitude in meters (MSL, WGS84, AGL or relative to home - depending on frame)."]
9840    pub z: f32,
9841    #[doc = "The scheduled action for the mission item, as defined by MAV_CMD enum"]
9842    pub command: MavCmd,
9843    #[doc = "System ID"]
9844    pub target_system: u8,
9845    #[doc = "Component ID"]
9846    pub target_component: u8,
9847    #[doc = "The coordinate system of the COMMAND, as defined by MAV_FRAME enum"]
9848    pub frame: MavFrame,
9849    #[doc = "false:0, true:1"]
9850    pub current: u8,
9851    #[doc = "autocontinue to next wp"]
9852    pub autocontinue: u8,
9853}
9854impl COMMAND_INT_STAMPED_DATA {
9855    pub const ENCODED_LEN: usize = 47usize;
9856    pub const DEFAULT: Self = Self {
9857        vehicle_timestamp: 0_u64,
9858        utc_time: 0_u32,
9859        param1: 0.0_f32,
9860        param2: 0.0_f32,
9861        param3: 0.0_f32,
9862        param4: 0.0_f32,
9863        x: 0_i32,
9864        y: 0_i32,
9865        z: 0.0_f32,
9866        command: MavCmd::DEFAULT,
9867        target_system: 0_u8,
9868        target_component: 0_u8,
9869        frame: MavFrame::DEFAULT,
9870        current: 0_u8,
9871        autocontinue: 0_u8,
9872    };
9873    #[cfg(feature = "arbitrary")]
9874    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9875        use arbitrary::{Arbitrary, Unstructured};
9876        let mut buf = [0u8; 1024];
9877        rng.fill_bytes(&mut buf);
9878        let mut unstructured = Unstructured::new(&buf);
9879        Self::arbitrary(&mut unstructured).unwrap_or_default()
9880    }
9881}
9882impl Default for COMMAND_INT_STAMPED_DATA {
9883    fn default() -> Self {
9884        Self::DEFAULT.clone()
9885    }
9886}
9887impl MessageData for COMMAND_INT_STAMPED_DATA {
9888    type Message = MavMessage;
9889    const ID: u32 = 223u32;
9890    const NAME: &'static str = "COMMAND_INT_STAMPED";
9891    const EXTRA_CRC: u8 = 119u8;
9892    const ENCODED_LEN: usize = 47usize;
9893    fn deser(
9894        _version: MavlinkVersion,
9895        __input: &[u8],
9896    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9897        let avail_len = __input.len();
9898        let mut payload_buf = [0; Self::ENCODED_LEN];
9899        let mut buf = if avail_len < Self::ENCODED_LEN {
9900            payload_buf[0..avail_len].copy_from_slice(__input);
9901            Bytes::new(&payload_buf)
9902        } else {
9903            Bytes::new(__input)
9904        };
9905        let mut __struct = Self::default();
9906        __struct.vehicle_timestamp = buf.get_u64_le();
9907        __struct.utc_time = buf.get_u32_le();
9908        __struct.param1 = buf.get_f32_le();
9909        __struct.param2 = buf.get_f32_le();
9910        __struct.param3 = buf.get_f32_le();
9911        __struct.param4 = buf.get_f32_le();
9912        __struct.x = buf.get_i32_le();
9913        __struct.y = buf.get_i32_le();
9914        __struct.z = buf.get_f32_le();
9915        let tmp = buf.get_u16_le();
9916        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9917            ::mavlink_core::error::ParserError::InvalidEnum {
9918                enum_type: "MavCmd",
9919                value: tmp as u64,
9920            },
9921        )?;
9922        __struct.target_system = buf.get_u8();
9923        __struct.target_component = buf.get_u8();
9924        let tmp = buf.get_u8();
9925        __struct.frame =
9926            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9927                enum_type: "MavFrame",
9928                value: tmp as u64,
9929            })?;
9930        __struct.current = buf.get_u8();
9931        __struct.autocontinue = buf.get_u8();
9932        Ok(__struct)
9933    }
9934    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9935        let mut __tmp = BytesMut::new(bytes);
9936        #[allow(clippy::absurd_extreme_comparisons)]
9937        #[allow(unused_comparisons)]
9938        if __tmp.remaining() < Self::ENCODED_LEN {
9939            panic!(
9940                "buffer is too small (need {} bytes, but got {})",
9941                Self::ENCODED_LEN,
9942                __tmp.remaining(),
9943            )
9944        }
9945        __tmp.put_u64_le(self.vehicle_timestamp);
9946        __tmp.put_u32_le(self.utc_time);
9947        __tmp.put_f32_le(self.param1);
9948        __tmp.put_f32_le(self.param2);
9949        __tmp.put_f32_le(self.param3);
9950        __tmp.put_f32_le(self.param4);
9951        __tmp.put_i32_le(self.x);
9952        __tmp.put_i32_le(self.y);
9953        __tmp.put_f32_le(self.z);
9954        __tmp.put_u16_le(self.command as u16);
9955        __tmp.put_u8(self.target_system);
9956        __tmp.put_u8(self.target_component);
9957        __tmp.put_u8(self.frame as u8);
9958        __tmp.put_u8(self.current);
9959        __tmp.put_u8(self.autocontinue);
9960        if matches!(version, MavlinkVersion::V2) {
9961            let len = __tmp.len();
9962            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9963        } else {
9964            __tmp.len()
9965        }
9966    }
9967}
9968#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9969#[doc = ""]
9970#[doc = "ID: 76"]
9971#[derive(Debug, Clone, PartialEq)]
9972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9974#[cfg_attr(feature = "ts", derive(TS))]
9975#[cfg_attr(feature = "ts", ts(export))]
9976pub struct COMMAND_LONG_DATA {
9977    #[doc = "Parameter 1 (for the specific command)."]
9978    pub param1: f32,
9979    #[doc = "Parameter 2 (for the specific command)."]
9980    pub param2: f32,
9981    #[doc = "Parameter 3 (for the specific command)."]
9982    pub param3: f32,
9983    #[doc = "Parameter 4 (for the specific command)."]
9984    pub param4: f32,
9985    #[doc = "Parameter 5 (for the specific command)."]
9986    pub param5: f32,
9987    #[doc = "Parameter 6 (for the specific command)."]
9988    pub param6: f32,
9989    #[doc = "Parameter 7 (for the specific command)."]
9990    pub param7: f32,
9991    #[doc = "Command ID (of command to send)."]
9992    pub command: MavCmd,
9993    #[doc = "System which should execute the command"]
9994    pub target_system: u8,
9995    #[doc = "Component which should execute the command, 0 for all components"]
9996    pub target_component: u8,
9997    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9998    pub confirmation: u8,
9999}
10000impl COMMAND_LONG_DATA {
10001    pub const ENCODED_LEN: usize = 33usize;
10002    pub const DEFAULT: Self = Self {
10003        param1: 0.0_f32,
10004        param2: 0.0_f32,
10005        param3: 0.0_f32,
10006        param4: 0.0_f32,
10007        param5: 0.0_f32,
10008        param6: 0.0_f32,
10009        param7: 0.0_f32,
10010        command: MavCmd::DEFAULT,
10011        target_system: 0_u8,
10012        target_component: 0_u8,
10013        confirmation: 0_u8,
10014    };
10015    #[cfg(feature = "arbitrary")]
10016    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10017        use arbitrary::{Arbitrary, Unstructured};
10018        let mut buf = [0u8; 1024];
10019        rng.fill_bytes(&mut buf);
10020        let mut unstructured = Unstructured::new(&buf);
10021        Self::arbitrary(&mut unstructured).unwrap_or_default()
10022    }
10023}
10024impl Default for COMMAND_LONG_DATA {
10025    fn default() -> Self {
10026        Self::DEFAULT.clone()
10027    }
10028}
10029impl MessageData for COMMAND_LONG_DATA {
10030    type Message = MavMessage;
10031    const ID: u32 = 76u32;
10032    const NAME: &'static str = "COMMAND_LONG";
10033    const EXTRA_CRC: u8 = 152u8;
10034    const ENCODED_LEN: usize = 33usize;
10035    fn deser(
10036        _version: MavlinkVersion,
10037        __input: &[u8],
10038    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10039        let avail_len = __input.len();
10040        let mut payload_buf = [0; Self::ENCODED_LEN];
10041        let mut buf = if avail_len < Self::ENCODED_LEN {
10042            payload_buf[0..avail_len].copy_from_slice(__input);
10043            Bytes::new(&payload_buf)
10044        } else {
10045            Bytes::new(__input)
10046        };
10047        let mut __struct = Self::default();
10048        __struct.param1 = buf.get_f32_le();
10049        __struct.param2 = buf.get_f32_le();
10050        __struct.param3 = buf.get_f32_le();
10051        __struct.param4 = buf.get_f32_le();
10052        __struct.param5 = buf.get_f32_le();
10053        __struct.param6 = buf.get_f32_le();
10054        __struct.param7 = buf.get_f32_le();
10055        let tmp = buf.get_u16_le();
10056        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
10057            ::mavlink_core::error::ParserError::InvalidEnum {
10058                enum_type: "MavCmd",
10059                value: tmp as u64,
10060            },
10061        )?;
10062        __struct.target_system = buf.get_u8();
10063        __struct.target_component = buf.get_u8();
10064        __struct.confirmation = buf.get_u8();
10065        Ok(__struct)
10066    }
10067    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10068        let mut __tmp = BytesMut::new(bytes);
10069        #[allow(clippy::absurd_extreme_comparisons)]
10070        #[allow(unused_comparisons)]
10071        if __tmp.remaining() < Self::ENCODED_LEN {
10072            panic!(
10073                "buffer is too small (need {} bytes, but got {})",
10074                Self::ENCODED_LEN,
10075                __tmp.remaining(),
10076            )
10077        }
10078        __tmp.put_f32_le(self.param1);
10079        __tmp.put_f32_le(self.param2);
10080        __tmp.put_f32_le(self.param3);
10081        __tmp.put_f32_le(self.param4);
10082        __tmp.put_f32_le(self.param5);
10083        __tmp.put_f32_le(self.param6);
10084        __tmp.put_f32_le(self.param7);
10085        __tmp.put_u16_le(self.command as u16);
10086        __tmp.put_u8(self.target_system);
10087        __tmp.put_u8(self.target_component);
10088        __tmp.put_u8(self.confirmation);
10089        if matches!(version, MavlinkVersion::V2) {
10090            let len = __tmp.len();
10091            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10092        } else {
10093            __tmp.len()
10094        }
10095    }
10096}
10097#[doc = "Send a command with up to seven parameters to the MAV and additional metadata."]
10098#[doc = ""]
10099#[doc = "ID: 224"]
10100#[derive(Debug, Clone, PartialEq)]
10101#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10102#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10103#[cfg_attr(feature = "ts", derive(TS))]
10104#[cfg_attr(feature = "ts", ts(export))]
10105pub struct COMMAND_LONG_STAMPED_DATA {
10106    #[doc = "Microseconds elapsed since vehicle boot"]
10107    pub vehicle_timestamp: u64,
10108    #[doc = "UTC time, seconds elapsed since 01.01.1970"]
10109    pub utc_time: u32,
10110    #[doc = "Parameter 1, as defined by MAV_CMD enum."]
10111    pub param1: f32,
10112    #[doc = "Parameter 2, as defined by MAV_CMD enum."]
10113    pub param2: f32,
10114    #[doc = "Parameter 3, as defined by MAV_CMD enum."]
10115    pub param3: f32,
10116    #[doc = "Parameter 4, as defined by MAV_CMD enum."]
10117    pub param4: f32,
10118    #[doc = "Parameter 5, as defined by MAV_CMD enum."]
10119    pub param5: f32,
10120    #[doc = "Parameter 6, as defined by MAV_CMD enum."]
10121    pub param6: f32,
10122    #[doc = "Parameter 7, as defined by MAV_CMD enum."]
10123    pub param7: f32,
10124    #[doc = "Command ID, as defined by MAV_CMD enum."]
10125    pub command: MavCmd,
10126    #[doc = "System which should execute the command"]
10127    pub target_system: u8,
10128    #[doc = "Component which should execute the command, 0 for all components"]
10129    pub target_component: u8,
10130    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
10131    pub confirmation: u8,
10132}
10133impl COMMAND_LONG_STAMPED_DATA {
10134    pub const ENCODED_LEN: usize = 45usize;
10135    pub const DEFAULT: Self = Self {
10136        vehicle_timestamp: 0_u64,
10137        utc_time: 0_u32,
10138        param1: 0.0_f32,
10139        param2: 0.0_f32,
10140        param3: 0.0_f32,
10141        param4: 0.0_f32,
10142        param5: 0.0_f32,
10143        param6: 0.0_f32,
10144        param7: 0.0_f32,
10145        command: MavCmd::DEFAULT,
10146        target_system: 0_u8,
10147        target_component: 0_u8,
10148        confirmation: 0_u8,
10149    };
10150    #[cfg(feature = "arbitrary")]
10151    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10152        use arbitrary::{Arbitrary, Unstructured};
10153        let mut buf = [0u8; 1024];
10154        rng.fill_bytes(&mut buf);
10155        let mut unstructured = Unstructured::new(&buf);
10156        Self::arbitrary(&mut unstructured).unwrap_or_default()
10157    }
10158}
10159impl Default for COMMAND_LONG_STAMPED_DATA {
10160    fn default() -> Self {
10161        Self::DEFAULT.clone()
10162    }
10163}
10164impl MessageData for COMMAND_LONG_STAMPED_DATA {
10165    type Message = MavMessage;
10166    const ID: u32 = 224u32;
10167    const NAME: &'static str = "COMMAND_LONG_STAMPED";
10168    const EXTRA_CRC: u8 = 102u8;
10169    const ENCODED_LEN: usize = 45usize;
10170    fn deser(
10171        _version: MavlinkVersion,
10172        __input: &[u8],
10173    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10174        let avail_len = __input.len();
10175        let mut payload_buf = [0; Self::ENCODED_LEN];
10176        let mut buf = if avail_len < Self::ENCODED_LEN {
10177            payload_buf[0..avail_len].copy_from_slice(__input);
10178            Bytes::new(&payload_buf)
10179        } else {
10180            Bytes::new(__input)
10181        };
10182        let mut __struct = Self::default();
10183        __struct.vehicle_timestamp = buf.get_u64_le();
10184        __struct.utc_time = buf.get_u32_le();
10185        __struct.param1 = buf.get_f32_le();
10186        __struct.param2 = buf.get_f32_le();
10187        __struct.param3 = buf.get_f32_le();
10188        __struct.param4 = buf.get_f32_le();
10189        __struct.param5 = buf.get_f32_le();
10190        __struct.param6 = buf.get_f32_le();
10191        __struct.param7 = buf.get_f32_le();
10192        let tmp = buf.get_u16_le();
10193        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
10194            ::mavlink_core::error::ParserError::InvalidEnum {
10195                enum_type: "MavCmd",
10196                value: tmp as u64,
10197            },
10198        )?;
10199        __struct.target_system = buf.get_u8();
10200        __struct.target_component = buf.get_u8();
10201        __struct.confirmation = buf.get_u8();
10202        Ok(__struct)
10203    }
10204    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10205        let mut __tmp = BytesMut::new(bytes);
10206        #[allow(clippy::absurd_extreme_comparisons)]
10207        #[allow(unused_comparisons)]
10208        if __tmp.remaining() < Self::ENCODED_LEN {
10209            panic!(
10210                "buffer is too small (need {} bytes, but got {})",
10211                Self::ENCODED_LEN,
10212                __tmp.remaining(),
10213            )
10214        }
10215        __tmp.put_u64_le(self.vehicle_timestamp);
10216        __tmp.put_u32_le(self.utc_time);
10217        __tmp.put_f32_le(self.param1);
10218        __tmp.put_f32_le(self.param2);
10219        __tmp.put_f32_le(self.param3);
10220        __tmp.put_f32_le(self.param4);
10221        __tmp.put_f32_le(self.param5);
10222        __tmp.put_f32_le(self.param6);
10223        __tmp.put_f32_le(self.param7);
10224        __tmp.put_u16_le(self.command as u16);
10225        __tmp.put_u8(self.target_system);
10226        __tmp.put_u8(self.target_component);
10227        __tmp.put_u8(self.confirmation);
10228        if matches!(version, MavlinkVersion::V2) {
10229            let len = __tmp.len();
10230            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10231        } else {
10232            __tmp.len()
10233        }
10234    }
10235}
10236#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
10237#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
10238#[doc = ""]
10239#[doc = "ID: 395"]
10240#[derive(Debug, Clone, PartialEq)]
10241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10243#[cfg_attr(feature = "ts", derive(TS))]
10244#[cfg_attr(feature = "ts", ts(export))]
10245pub struct COMPONENT_INFORMATION_DATA {
10246    #[doc = "Timestamp (time since system boot)."]
10247    pub time_boot_ms: u32,
10248    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
10249    pub general_metadata_file_crc: u32,
10250    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
10251    pub peripherals_metadata_file_crc: u32,
10252    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10253    #[cfg_attr(feature = "ts", ts(type = "string"))]
10254    pub general_metadata_uri: CharArray<100>,
10255    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
10256    #[cfg_attr(feature = "ts", ts(type = "string"))]
10257    pub peripherals_metadata_uri: CharArray<100>,
10258}
10259impl COMPONENT_INFORMATION_DATA {
10260    pub const ENCODED_LEN: usize = 212usize;
10261    pub const DEFAULT: Self = Self {
10262        time_boot_ms: 0_u32,
10263        general_metadata_file_crc: 0_u32,
10264        peripherals_metadata_file_crc: 0_u32,
10265        general_metadata_uri: CharArray::new([0_u8; 100usize]),
10266        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
10267    };
10268    #[cfg(feature = "arbitrary")]
10269    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10270        use arbitrary::{Arbitrary, Unstructured};
10271        let mut buf = [0u8; 1024];
10272        rng.fill_bytes(&mut buf);
10273        let mut unstructured = Unstructured::new(&buf);
10274        Self::arbitrary(&mut unstructured).unwrap_or_default()
10275    }
10276}
10277impl Default for COMPONENT_INFORMATION_DATA {
10278    fn default() -> Self {
10279        Self::DEFAULT.clone()
10280    }
10281}
10282impl MessageData for COMPONENT_INFORMATION_DATA {
10283    type Message = MavMessage;
10284    const ID: u32 = 395u32;
10285    const NAME: &'static str = "COMPONENT_INFORMATION";
10286    const EXTRA_CRC: u8 = 0u8;
10287    const ENCODED_LEN: usize = 212usize;
10288    fn deser(
10289        _version: MavlinkVersion,
10290        __input: &[u8],
10291    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10292        let avail_len = __input.len();
10293        let mut payload_buf = [0; Self::ENCODED_LEN];
10294        let mut buf = if avail_len < Self::ENCODED_LEN {
10295            payload_buf[0..avail_len].copy_from_slice(__input);
10296            Bytes::new(&payload_buf)
10297        } else {
10298            Bytes::new(__input)
10299        };
10300        let mut __struct = Self::default();
10301        __struct.time_boot_ms = buf.get_u32_le();
10302        __struct.general_metadata_file_crc = buf.get_u32_le();
10303        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
10304        let mut tmp = [0_u8; 100usize];
10305        for v in &mut tmp {
10306            *v = buf.get_u8();
10307        }
10308        __struct.general_metadata_uri = CharArray::new(tmp);
10309        let mut tmp = [0_u8; 100usize];
10310        for v in &mut tmp {
10311            *v = buf.get_u8();
10312        }
10313        __struct.peripherals_metadata_uri = CharArray::new(tmp);
10314        Ok(__struct)
10315    }
10316    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10317        let mut __tmp = BytesMut::new(bytes);
10318        #[allow(clippy::absurd_extreme_comparisons)]
10319        #[allow(unused_comparisons)]
10320        if __tmp.remaining() < Self::ENCODED_LEN {
10321            panic!(
10322                "buffer is too small (need {} bytes, but got {})",
10323                Self::ENCODED_LEN,
10324                __tmp.remaining(),
10325            )
10326        }
10327        __tmp.put_u32_le(self.time_boot_ms);
10328        __tmp.put_u32_le(self.general_metadata_file_crc);
10329        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
10330        for val in &self.general_metadata_uri {
10331            __tmp.put_u8(*val);
10332        }
10333        for val in &self.peripherals_metadata_uri {
10334            __tmp.put_u8(*val);
10335        }
10336        if matches!(version, MavlinkVersion::V2) {
10337            let len = __tmp.len();
10338            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10339        } else {
10340            __tmp.len()
10341        }
10342    }
10343}
10344#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
10345#[doc = ""]
10346#[doc = "ID: 396"]
10347#[derive(Debug, Clone, PartialEq)]
10348#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10350#[cfg_attr(feature = "ts", derive(TS))]
10351#[cfg_attr(feature = "ts", ts(export))]
10352pub struct COMPONENT_INFORMATION_BASIC_DATA {
10353    #[doc = "Component capability flags"]
10354    pub capabilities: MavProtocolCapability,
10355    #[doc = "Timestamp (time since system boot)."]
10356    pub time_boot_ms: u32,
10357    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
10358    pub time_manufacture_s: u32,
10359    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10360    #[cfg_attr(feature = "ts", ts(type = "string"))]
10361    pub vendor_name: CharArray<32>,
10362    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10363    #[cfg_attr(feature = "ts", ts(type = "string"))]
10364    pub model_name: CharArray<32>,
10365    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10366    #[cfg_attr(feature = "ts", ts(type = "string"))]
10367    pub software_version: CharArray<24>,
10368    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10369    #[cfg_attr(feature = "ts", ts(type = "string"))]
10370    pub hardware_version: CharArray<24>,
10371    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10372    #[cfg_attr(feature = "ts", ts(type = "string"))]
10373    pub serial_number: CharArray<32>,
10374}
10375impl COMPONENT_INFORMATION_BASIC_DATA {
10376    pub const ENCODED_LEN: usize = 160usize;
10377    pub const DEFAULT: Self = Self {
10378        capabilities: MavProtocolCapability::DEFAULT,
10379        time_boot_ms: 0_u32,
10380        time_manufacture_s: 0_u32,
10381        vendor_name: CharArray::new([0_u8; 32usize]),
10382        model_name: CharArray::new([0_u8; 32usize]),
10383        software_version: CharArray::new([0_u8; 24usize]),
10384        hardware_version: CharArray::new([0_u8; 24usize]),
10385        serial_number: CharArray::new([0_u8; 32usize]),
10386    };
10387    #[cfg(feature = "arbitrary")]
10388    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10389        use arbitrary::{Arbitrary, Unstructured};
10390        let mut buf = [0u8; 1024];
10391        rng.fill_bytes(&mut buf);
10392        let mut unstructured = Unstructured::new(&buf);
10393        Self::arbitrary(&mut unstructured).unwrap_or_default()
10394    }
10395}
10396impl Default for COMPONENT_INFORMATION_BASIC_DATA {
10397    fn default() -> Self {
10398        Self::DEFAULT.clone()
10399    }
10400}
10401impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
10402    type Message = MavMessage;
10403    const ID: u32 = 396u32;
10404    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
10405    const EXTRA_CRC: u8 = 50u8;
10406    const ENCODED_LEN: usize = 160usize;
10407    fn deser(
10408        _version: MavlinkVersion,
10409        __input: &[u8],
10410    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10411        let avail_len = __input.len();
10412        let mut payload_buf = [0; Self::ENCODED_LEN];
10413        let mut buf = if avail_len < Self::ENCODED_LEN {
10414            payload_buf[0..avail_len].copy_from_slice(__input);
10415            Bytes::new(&payload_buf)
10416        } else {
10417            Bytes::new(__input)
10418        };
10419        let mut __struct = Self::default();
10420        let tmp = buf.get_u64_le();
10421        __struct.capabilities = MavProtocolCapability::from_bits(
10422            tmp as <MavProtocolCapability as Flags>::Bits,
10423        )
10424        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10425            flag_type: "MavProtocolCapability",
10426            value: tmp as u64,
10427        })?;
10428        __struct.time_boot_ms = buf.get_u32_le();
10429        __struct.time_manufacture_s = buf.get_u32_le();
10430        let mut tmp = [0_u8; 32usize];
10431        for v in &mut tmp {
10432            *v = buf.get_u8();
10433        }
10434        __struct.vendor_name = CharArray::new(tmp);
10435        let mut tmp = [0_u8; 32usize];
10436        for v in &mut tmp {
10437            *v = buf.get_u8();
10438        }
10439        __struct.model_name = CharArray::new(tmp);
10440        let mut tmp = [0_u8; 24usize];
10441        for v in &mut tmp {
10442            *v = buf.get_u8();
10443        }
10444        __struct.software_version = CharArray::new(tmp);
10445        let mut tmp = [0_u8; 24usize];
10446        for v in &mut tmp {
10447            *v = buf.get_u8();
10448        }
10449        __struct.hardware_version = CharArray::new(tmp);
10450        let mut tmp = [0_u8; 32usize];
10451        for v in &mut tmp {
10452            *v = buf.get_u8();
10453        }
10454        __struct.serial_number = CharArray::new(tmp);
10455        Ok(__struct)
10456    }
10457    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10458        let mut __tmp = BytesMut::new(bytes);
10459        #[allow(clippy::absurd_extreme_comparisons)]
10460        #[allow(unused_comparisons)]
10461        if __tmp.remaining() < Self::ENCODED_LEN {
10462            panic!(
10463                "buffer is too small (need {} bytes, but got {})",
10464                Self::ENCODED_LEN,
10465                __tmp.remaining(),
10466            )
10467        }
10468        __tmp.put_u64_le(self.capabilities.bits() as u64);
10469        __tmp.put_u32_le(self.time_boot_ms);
10470        __tmp.put_u32_le(self.time_manufacture_s);
10471        for val in &self.vendor_name {
10472            __tmp.put_u8(*val);
10473        }
10474        for val in &self.model_name {
10475            __tmp.put_u8(*val);
10476        }
10477        for val in &self.software_version {
10478            __tmp.put_u8(*val);
10479        }
10480        for val in &self.hardware_version {
10481            __tmp.put_u8(*val);
10482        }
10483        for val in &self.serial_number {
10484            __tmp.put_u8(*val);
10485        }
10486        if matches!(version, MavlinkVersion::V2) {
10487            let len = __tmp.len();
10488            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10489        } else {
10490            __tmp.len()
10491        }
10492    }
10493}
10494#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
10495#[doc = ""]
10496#[doc = "ID: 397"]
10497#[derive(Debug, Clone, PartialEq)]
10498#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10500#[cfg_attr(feature = "ts", derive(TS))]
10501#[cfg_attr(feature = "ts", ts(export))]
10502pub struct COMPONENT_METADATA_DATA {
10503    #[doc = "Timestamp (time since system boot)."]
10504    pub time_boot_ms: u32,
10505    #[doc = "CRC32 of the general metadata file."]
10506    pub file_crc: u32,
10507    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10508    #[cfg_attr(feature = "ts", ts(type = "string"))]
10509    pub uri: CharArray<100>,
10510}
10511impl COMPONENT_METADATA_DATA {
10512    pub const ENCODED_LEN: usize = 108usize;
10513    pub const DEFAULT: Self = Self {
10514        time_boot_ms: 0_u32,
10515        file_crc: 0_u32,
10516        uri: CharArray::new([0_u8; 100usize]),
10517    };
10518    #[cfg(feature = "arbitrary")]
10519    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10520        use arbitrary::{Arbitrary, Unstructured};
10521        let mut buf = [0u8; 1024];
10522        rng.fill_bytes(&mut buf);
10523        let mut unstructured = Unstructured::new(&buf);
10524        Self::arbitrary(&mut unstructured).unwrap_or_default()
10525    }
10526}
10527impl Default for COMPONENT_METADATA_DATA {
10528    fn default() -> Self {
10529        Self::DEFAULT.clone()
10530    }
10531}
10532impl MessageData for COMPONENT_METADATA_DATA {
10533    type Message = MavMessage;
10534    const ID: u32 = 397u32;
10535    const NAME: &'static str = "COMPONENT_METADATA";
10536    const EXTRA_CRC: u8 = 182u8;
10537    const ENCODED_LEN: usize = 108usize;
10538    fn deser(
10539        _version: MavlinkVersion,
10540        __input: &[u8],
10541    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10542        let avail_len = __input.len();
10543        let mut payload_buf = [0; Self::ENCODED_LEN];
10544        let mut buf = if avail_len < Self::ENCODED_LEN {
10545            payload_buf[0..avail_len].copy_from_slice(__input);
10546            Bytes::new(&payload_buf)
10547        } else {
10548            Bytes::new(__input)
10549        };
10550        let mut __struct = Self::default();
10551        __struct.time_boot_ms = buf.get_u32_le();
10552        __struct.file_crc = buf.get_u32_le();
10553        let mut tmp = [0_u8; 100usize];
10554        for v in &mut tmp {
10555            *v = buf.get_u8();
10556        }
10557        __struct.uri = CharArray::new(tmp);
10558        Ok(__struct)
10559    }
10560    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10561        let mut __tmp = BytesMut::new(bytes);
10562        #[allow(clippy::absurd_extreme_comparisons)]
10563        #[allow(unused_comparisons)]
10564        if __tmp.remaining() < Self::ENCODED_LEN {
10565            panic!(
10566                "buffer is too small (need {} bytes, but got {})",
10567                Self::ENCODED_LEN,
10568                __tmp.remaining(),
10569            )
10570        }
10571        __tmp.put_u32_le(self.time_boot_ms);
10572        __tmp.put_u32_le(self.file_crc);
10573        for val in &self.uri {
10574            __tmp.put_u8(*val);
10575        }
10576        if matches!(version, MavlinkVersion::V2) {
10577            let len = __tmp.len();
10578            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10579        } else {
10580            __tmp.len()
10581        }
10582    }
10583}
10584#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
10585#[doc = ""]
10586#[doc = "ID: 146"]
10587#[derive(Debug, Clone, PartialEq)]
10588#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10589#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10590#[cfg_attr(feature = "ts", derive(TS))]
10591#[cfg_attr(feature = "ts", ts(export))]
10592pub struct CONTROL_SYSTEM_STATE_DATA {
10593    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10594    pub time_usec: u64,
10595    #[doc = "X acceleration in body frame"]
10596    pub x_acc: f32,
10597    #[doc = "Y acceleration in body frame"]
10598    pub y_acc: f32,
10599    #[doc = "Z acceleration in body frame"]
10600    pub z_acc: f32,
10601    #[doc = "X velocity in body frame"]
10602    pub x_vel: f32,
10603    #[doc = "Y velocity in body frame"]
10604    pub y_vel: f32,
10605    #[doc = "Z velocity in body frame"]
10606    pub z_vel: f32,
10607    #[doc = "X position in local frame"]
10608    pub x_pos: f32,
10609    #[doc = "Y position in local frame"]
10610    pub y_pos: f32,
10611    #[doc = "Z position in local frame"]
10612    pub z_pos: f32,
10613    #[doc = "Airspeed, set to -1 if unknown"]
10614    pub airspeed: f32,
10615    #[doc = "Variance of body velocity estimate"]
10616    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10617    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10618    pub vel_variance: [f32; 3],
10619    #[doc = "Variance in local position"]
10620    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10621    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10622    pub pos_variance: [f32; 3],
10623    #[doc = "The attitude, represented as Quaternion"]
10624    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10625    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10626    pub q: [f32; 4],
10627    #[doc = "Angular rate in roll axis"]
10628    pub roll_rate: f32,
10629    #[doc = "Angular rate in pitch axis"]
10630    pub pitch_rate: f32,
10631    #[doc = "Angular rate in yaw axis"]
10632    pub yaw_rate: f32,
10633}
10634impl CONTROL_SYSTEM_STATE_DATA {
10635    pub const ENCODED_LEN: usize = 100usize;
10636    pub const DEFAULT: Self = Self {
10637        time_usec: 0_u64,
10638        x_acc: 0.0_f32,
10639        y_acc: 0.0_f32,
10640        z_acc: 0.0_f32,
10641        x_vel: 0.0_f32,
10642        y_vel: 0.0_f32,
10643        z_vel: 0.0_f32,
10644        x_pos: 0.0_f32,
10645        y_pos: 0.0_f32,
10646        z_pos: 0.0_f32,
10647        airspeed: 0.0_f32,
10648        vel_variance: [0.0_f32; 3usize],
10649        pos_variance: [0.0_f32; 3usize],
10650        q: [0.0_f32; 4usize],
10651        roll_rate: 0.0_f32,
10652        pitch_rate: 0.0_f32,
10653        yaw_rate: 0.0_f32,
10654    };
10655    #[cfg(feature = "arbitrary")]
10656    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10657        use arbitrary::{Arbitrary, Unstructured};
10658        let mut buf = [0u8; 1024];
10659        rng.fill_bytes(&mut buf);
10660        let mut unstructured = Unstructured::new(&buf);
10661        Self::arbitrary(&mut unstructured).unwrap_or_default()
10662    }
10663}
10664impl Default for CONTROL_SYSTEM_STATE_DATA {
10665    fn default() -> Self {
10666        Self::DEFAULT.clone()
10667    }
10668}
10669impl MessageData for CONTROL_SYSTEM_STATE_DATA {
10670    type Message = MavMessage;
10671    const ID: u32 = 146u32;
10672    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
10673    const EXTRA_CRC: u8 = 103u8;
10674    const ENCODED_LEN: usize = 100usize;
10675    fn deser(
10676        _version: MavlinkVersion,
10677        __input: &[u8],
10678    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10679        let avail_len = __input.len();
10680        let mut payload_buf = [0; Self::ENCODED_LEN];
10681        let mut buf = if avail_len < Self::ENCODED_LEN {
10682            payload_buf[0..avail_len].copy_from_slice(__input);
10683            Bytes::new(&payload_buf)
10684        } else {
10685            Bytes::new(__input)
10686        };
10687        let mut __struct = Self::default();
10688        __struct.time_usec = buf.get_u64_le();
10689        __struct.x_acc = buf.get_f32_le();
10690        __struct.y_acc = buf.get_f32_le();
10691        __struct.z_acc = buf.get_f32_le();
10692        __struct.x_vel = buf.get_f32_le();
10693        __struct.y_vel = buf.get_f32_le();
10694        __struct.z_vel = buf.get_f32_le();
10695        __struct.x_pos = buf.get_f32_le();
10696        __struct.y_pos = buf.get_f32_le();
10697        __struct.z_pos = buf.get_f32_le();
10698        __struct.airspeed = buf.get_f32_le();
10699        for v in &mut __struct.vel_variance {
10700            let val = buf.get_f32_le();
10701            *v = val;
10702        }
10703        for v in &mut __struct.pos_variance {
10704            let val = buf.get_f32_le();
10705            *v = val;
10706        }
10707        for v in &mut __struct.q {
10708            let val = buf.get_f32_le();
10709            *v = val;
10710        }
10711        __struct.roll_rate = buf.get_f32_le();
10712        __struct.pitch_rate = buf.get_f32_le();
10713        __struct.yaw_rate = buf.get_f32_le();
10714        Ok(__struct)
10715    }
10716    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10717        let mut __tmp = BytesMut::new(bytes);
10718        #[allow(clippy::absurd_extreme_comparisons)]
10719        #[allow(unused_comparisons)]
10720        if __tmp.remaining() < Self::ENCODED_LEN {
10721            panic!(
10722                "buffer is too small (need {} bytes, but got {})",
10723                Self::ENCODED_LEN,
10724                __tmp.remaining(),
10725            )
10726        }
10727        __tmp.put_u64_le(self.time_usec);
10728        __tmp.put_f32_le(self.x_acc);
10729        __tmp.put_f32_le(self.y_acc);
10730        __tmp.put_f32_le(self.z_acc);
10731        __tmp.put_f32_le(self.x_vel);
10732        __tmp.put_f32_le(self.y_vel);
10733        __tmp.put_f32_le(self.z_vel);
10734        __tmp.put_f32_le(self.x_pos);
10735        __tmp.put_f32_le(self.y_pos);
10736        __tmp.put_f32_le(self.z_pos);
10737        __tmp.put_f32_le(self.airspeed);
10738        for val in &self.vel_variance {
10739            __tmp.put_f32_le(*val);
10740        }
10741        for val in &self.pos_variance {
10742            __tmp.put_f32_le(*val);
10743        }
10744        for val in &self.q {
10745            __tmp.put_f32_le(*val);
10746        }
10747        __tmp.put_f32_le(self.roll_rate);
10748        __tmp.put_f32_le(self.pitch_rate);
10749        __tmp.put_f32_le(self.yaw_rate);
10750        if matches!(version, MavlinkVersion::V2) {
10751            let len = __tmp.len();
10752            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10753        } else {
10754            __tmp.len()
10755        }
10756    }
10757}
10758#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10759#[doc = ""]
10760#[doc = "ID: 411"]
10761#[derive(Debug, Clone, PartialEq)]
10762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10763#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10764#[cfg_attr(feature = "ts", derive(TS))]
10765#[cfg_attr(feature = "ts", ts(export))]
10766pub struct CURRENT_EVENT_SEQUENCE_DATA {
10767    #[doc = "Sequence number."]
10768    pub sequence: u16,
10769    #[doc = "Flag bitset."]
10770    pub flags: MavEventCurrentSequenceFlags,
10771}
10772impl CURRENT_EVENT_SEQUENCE_DATA {
10773    pub const ENCODED_LEN: usize = 3usize;
10774    pub const DEFAULT: Self = Self {
10775        sequence: 0_u16,
10776        flags: MavEventCurrentSequenceFlags::DEFAULT,
10777    };
10778    #[cfg(feature = "arbitrary")]
10779    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10780        use arbitrary::{Arbitrary, Unstructured};
10781        let mut buf = [0u8; 1024];
10782        rng.fill_bytes(&mut buf);
10783        let mut unstructured = Unstructured::new(&buf);
10784        Self::arbitrary(&mut unstructured).unwrap_or_default()
10785    }
10786}
10787impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10788    fn default() -> Self {
10789        Self::DEFAULT.clone()
10790    }
10791}
10792impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10793    type Message = MavMessage;
10794    const ID: u32 = 411u32;
10795    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10796    const EXTRA_CRC: u8 = 106u8;
10797    const ENCODED_LEN: usize = 3usize;
10798    fn deser(
10799        _version: MavlinkVersion,
10800        __input: &[u8],
10801    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10802        let avail_len = __input.len();
10803        let mut payload_buf = [0; Self::ENCODED_LEN];
10804        let mut buf = if avail_len < Self::ENCODED_LEN {
10805            payload_buf[0..avail_len].copy_from_slice(__input);
10806            Bytes::new(&payload_buf)
10807        } else {
10808            Bytes::new(__input)
10809        };
10810        let mut __struct = Self::default();
10811        __struct.sequence = buf.get_u16_le();
10812        let tmp = buf.get_u8();
10813        __struct.flags =
10814            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10815                enum_type: "MavEventCurrentSequenceFlags",
10816                value: tmp as u64,
10817            })?;
10818        Ok(__struct)
10819    }
10820    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10821        let mut __tmp = BytesMut::new(bytes);
10822        #[allow(clippy::absurd_extreme_comparisons)]
10823        #[allow(unused_comparisons)]
10824        if __tmp.remaining() < Self::ENCODED_LEN {
10825            panic!(
10826                "buffer is too small (need {} bytes, but got {})",
10827                Self::ENCODED_LEN,
10828                __tmp.remaining(),
10829            )
10830        }
10831        __tmp.put_u16_le(self.sequence);
10832        __tmp.put_u8(self.flags as u8);
10833        if matches!(version, MavlinkVersion::V2) {
10834            let len = __tmp.len();
10835            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10836        } else {
10837            __tmp.len()
10838        }
10839    }
10840}
10841#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10842#[doc = ""]
10843#[doc = "ID: 436"]
10844#[derive(Debug, Clone, PartialEq)]
10845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10847#[cfg_attr(feature = "ts", derive(TS))]
10848#[cfg_attr(feature = "ts", ts(export))]
10849pub struct CURRENT_MODE_DATA {
10850    #[doc = "A bitfield for use for autopilot-specific flags"]
10851    pub custom_mode: u32,
10852    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10853    pub intended_custom_mode: u32,
10854    #[doc = "Standard mode."]
10855    pub standard_mode: MavStandardMode,
10856}
10857impl CURRENT_MODE_DATA {
10858    pub const ENCODED_LEN: usize = 9usize;
10859    pub const DEFAULT: Self = Self {
10860        custom_mode: 0_u32,
10861        intended_custom_mode: 0_u32,
10862        standard_mode: MavStandardMode::DEFAULT,
10863    };
10864    #[cfg(feature = "arbitrary")]
10865    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10866        use arbitrary::{Arbitrary, Unstructured};
10867        let mut buf = [0u8; 1024];
10868        rng.fill_bytes(&mut buf);
10869        let mut unstructured = Unstructured::new(&buf);
10870        Self::arbitrary(&mut unstructured).unwrap_or_default()
10871    }
10872}
10873impl Default for CURRENT_MODE_DATA {
10874    fn default() -> Self {
10875        Self::DEFAULT.clone()
10876    }
10877}
10878impl MessageData for CURRENT_MODE_DATA {
10879    type Message = MavMessage;
10880    const ID: u32 = 436u32;
10881    const NAME: &'static str = "CURRENT_MODE";
10882    const EXTRA_CRC: u8 = 193u8;
10883    const ENCODED_LEN: usize = 9usize;
10884    fn deser(
10885        _version: MavlinkVersion,
10886        __input: &[u8],
10887    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10888        let avail_len = __input.len();
10889        let mut payload_buf = [0; Self::ENCODED_LEN];
10890        let mut buf = if avail_len < Self::ENCODED_LEN {
10891            payload_buf[0..avail_len].copy_from_slice(__input);
10892            Bytes::new(&payload_buf)
10893        } else {
10894            Bytes::new(__input)
10895        };
10896        let mut __struct = Self::default();
10897        __struct.custom_mode = buf.get_u32_le();
10898        __struct.intended_custom_mode = buf.get_u32_le();
10899        let tmp = buf.get_u8();
10900        __struct.standard_mode =
10901            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10902                enum_type: "MavStandardMode",
10903                value: tmp as u64,
10904            })?;
10905        Ok(__struct)
10906    }
10907    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10908        let mut __tmp = BytesMut::new(bytes);
10909        #[allow(clippy::absurd_extreme_comparisons)]
10910        #[allow(unused_comparisons)]
10911        if __tmp.remaining() < Self::ENCODED_LEN {
10912            panic!(
10913                "buffer is too small (need {} bytes, but got {})",
10914                Self::ENCODED_LEN,
10915                __tmp.remaining(),
10916            )
10917        }
10918        __tmp.put_u32_le(self.custom_mode);
10919        __tmp.put_u32_le(self.intended_custom_mode);
10920        __tmp.put_u8(self.standard_mode as u8);
10921        if matches!(version, MavlinkVersion::V2) {
10922            let len = __tmp.len();
10923            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10924        } else {
10925            __tmp.len()
10926        }
10927    }
10928}
10929#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10930#[doc = "Data stream status information."]
10931#[doc = ""]
10932#[doc = "ID: 67"]
10933#[derive(Debug, Clone, PartialEq)]
10934#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10935#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10936#[cfg_attr(feature = "ts", derive(TS))]
10937#[cfg_attr(feature = "ts", ts(export))]
10938pub struct DATA_STREAM_DATA {
10939    #[doc = "The message rate"]
10940    pub message_rate: u16,
10941    #[doc = "The ID of the requested data stream"]
10942    pub stream_id: u8,
10943    #[doc = "1 stream is enabled, 0 stream is stopped."]
10944    pub on_off: u8,
10945}
10946impl DATA_STREAM_DATA {
10947    pub const ENCODED_LEN: usize = 4usize;
10948    pub const DEFAULT: Self = Self {
10949        message_rate: 0_u16,
10950        stream_id: 0_u8,
10951        on_off: 0_u8,
10952    };
10953    #[cfg(feature = "arbitrary")]
10954    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10955        use arbitrary::{Arbitrary, Unstructured};
10956        let mut buf = [0u8; 1024];
10957        rng.fill_bytes(&mut buf);
10958        let mut unstructured = Unstructured::new(&buf);
10959        Self::arbitrary(&mut unstructured).unwrap_or_default()
10960    }
10961}
10962impl Default for DATA_STREAM_DATA {
10963    fn default() -> Self {
10964        Self::DEFAULT.clone()
10965    }
10966}
10967impl MessageData for DATA_STREAM_DATA {
10968    type Message = MavMessage;
10969    const ID: u32 = 67u32;
10970    const NAME: &'static str = "DATA_STREAM";
10971    const EXTRA_CRC: u8 = 21u8;
10972    const ENCODED_LEN: usize = 4usize;
10973    fn deser(
10974        _version: MavlinkVersion,
10975        __input: &[u8],
10976    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10977        let avail_len = __input.len();
10978        let mut payload_buf = [0; Self::ENCODED_LEN];
10979        let mut buf = if avail_len < Self::ENCODED_LEN {
10980            payload_buf[0..avail_len].copy_from_slice(__input);
10981            Bytes::new(&payload_buf)
10982        } else {
10983            Bytes::new(__input)
10984        };
10985        let mut __struct = Self::default();
10986        __struct.message_rate = buf.get_u16_le();
10987        __struct.stream_id = buf.get_u8();
10988        __struct.on_off = buf.get_u8();
10989        Ok(__struct)
10990    }
10991    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10992        let mut __tmp = BytesMut::new(bytes);
10993        #[allow(clippy::absurd_extreme_comparisons)]
10994        #[allow(unused_comparisons)]
10995        if __tmp.remaining() < Self::ENCODED_LEN {
10996            panic!(
10997                "buffer is too small (need {} bytes, but got {})",
10998                Self::ENCODED_LEN,
10999                __tmp.remaining(),
11000            )
11001        }
11002        __tmp.put_u16_le(self.message_rate);
11003        __tmp.put_u8(self.stream_id);
11004        __tmp.put_u8(self.on_off);
11005        if matches!(version, MavlinkVersion::V2) {
11006            let len = __tmp.len();
11007            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11008        } else {
11009            __tmp.len()
11010        }
11011    }
11012}
11013#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11014#[doc = ""]
11015#[doc = "ID: 130"]
11016#[derive(Debug, Clone, PartialEq)]
11017#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11018#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11019#[cfg_attr(feature = "ts", derive(TS))]
11020#[cfg_attr(feature = "ts", ts(export))]
11021pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
11022    #[doc = "total data size (set on ACK only)."]
11023    pub size: u32,
11024    #[doc = "Width of a matrix or image."]
11025    pub width: u16,
11026    #[doc = "Height of a matrix or image."]
11027    pub height: u16,
11028    #[doc = "Number of packets being sent (set on ACK only)."]
11029    pub packets: u16,
11030    #[doc = "Type of requested/acknowledged data."]
11031    pub mavtype: MavlinkDataStreamType,
11032    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
11033    pub payload: u8,
11034    #[doc = "JPEG quality. Values: [1-100]."]
11035    pub jpg_quality: u8,
11036}
11037impl DATA_TRANSMISSION_HANDSHAKE_DATA {
11038    pub const ENCODED_LEN: usize = 13usize;
11039    pub const DEFAULT: Self = Self {
11040        size: 0_u32,
11041        width: 0_u16,
11042        height: 0_u16,
11043        packets: 0_u16,
11044        mavtype: MavlinkDataStreamType::DEFAULT,
11045        payload: 0_u8,
11046        jpg_quality: 0_u8,
11047    };
11048    #[cfg(feature = "arbitrary")]
11049    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11050        use arbitrary::{Arbitrary, Unstructured};
11051        let mut buf = [0u8; 1024];
11052        rng.fill_bytes(&mut buf);
11053        let mut unstructured = Unstructured::new(&buf);
11054        Self::arbitrary(&mut unstructured).unwrap_or_default()
11055    }
11056}
11057impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
11058    fn default() -> Self {
11059        Self::DEFAULT.clone()
11060    }
11061}
11062impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
11063    type Message = MavMessage;
11064    const ID: u32 = 130u32;
11065    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
11066    const EXTRA_CRC: u8 = 29u8;
11067    const ENCODED_LEN: usize = 13usize;
11068    fn deser(
11069        _version: MavlinkVersion,
11070        __input: &[u8],
11071    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11072        let avail_len = __input.len();
11073        let mut payload_buf = [0; Self::ENCODED_LEN];
11074        let mut buf = if avail_len < Self::ENCODED_LEN {
11075            payload_buf[0..avail_len].copy_from_slice(__input);
11076            Bytes::new(&payload_buf)
11077        } else {
11078            Bytes::new(__input)
11079        };
11080        let mut __struct = Self::default();
11081        __struct.size = buf.get_u32_le();
11082        __struct.width = buf.get_u16_le();
11083        __struct.height = buf.get_u16_le();
11084        __struct.packets = buf.get_u16_le();
11085        let tmp = buf.get_u8();
11086        __struct.mavtype =
11087            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11088                enum_type: "MavlinkDataStreamType",
11089                value: tmp as u64,
11090            })?;
11091        __struct.payload = buf.get_u8();
11092        __struct.jpg_quality = buf.get_u8();
11093        Ok(__struct)
11094    }
11095    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11096        let mut __tmp = BytesMut::new(bytes);
11097        #[allow(clippy::absurd_extreme_comparisons)]
11098        #[allow(unused_comparisons)]
11099        if __tmp.remaining() < Self::ENCODED_LEN {
11100            panic!(
11101                "buffer is too small (need {} bytes, but got {})",
11102                Self::ENCODED_LEN,
11103                __tmp.remaining(),
11104            )
11105        }
11106        __tmp.put_u32_le(self.size);
11107        __tmp.put_u16_le(self.width);
11108        __tmp.put_u16_le(self.height);
11109        __tmp.put_u16_le(self.packets);
11110        __tmp.put_u8(self.mavtype as u8);
11111        __tmp.put_u8(self.payload);
11112        __tmp.put_u8(self.jpg_quality);
11113        if matches!(version, MavlinkVersion::V2) {
11114            let len = __tmp.len();
11115            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11116        } else {
11117            __tmp.len()
11118        }
11119    }
11120}
11121#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
11122#[doc = ""]
11123#[doc = "ID: 254"]
11124#[derive(Debug, Clone, PartialEq)]
11125#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11126#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11127#[cfg_attr(feature = "ts", derive(TS))]
11128#[cfg_attr(feature = "ts", ts(export))]
11129pub struct DEBUG_DATA {
11130    #[doc = "Timestamp (time since system boot)."]
11131    pub time_boot_ms: u32,
11132    #[doc = "DEBUG value"]
11133    pub value: f32,
11134    #[doc = "index of debug variable"]
11135    pub ind: u8,
11136}
11137impl DEBUG_DATA {
11138    pub const ENCODED_LEN: usize = 9usize;
11139    pub const DEFAULT: Self = Self {
11140        time_boot_ms: 0_u32,
11141        value: 0.0_f32,
11142        ind: 0_u8,
11143    };
11144    #[cfg(feature = "arbitrary")]
11145    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11146        use arbitrary::{Arbitrary, Unstructured};
11147        let mut buf = [0u8; 1024];
11148        rng.fill_bytes(&mut buf);
11149        let mut unstructured = Unstructured::new(&buf);
11150        Self::arbitrary(&mut unstructured).unwrap_or_default()
11151    }
11152}
11153impl Default for DEBUG_DATA {
11154    fn default() -> Self {
11155        Self::DEFAULT.clone()
11156    }
11157}
11158impl MessageData for DEBUG_DATA {
11159    type Message = MavMessage;
11160    const ID: u32 = 254u32;
11161    const NAME: &'static str = "DEBUG";
11162    const EXTRA_CRC: u8 = 46u8;
11163    const ENCODED_LEN: usize = 9usize;
11164    fn deser(
11165        _version: MavlinkVersion,
11166        __input: &[u8],
11167    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11168        let avail_len = __input.len();
11169        let mut payload_buf = [0; Self::ENCODED_LEN];
11170        let mut buf = if avail_len < Self::ENCODED_LEN {
11171            payload_buf[0..avail_len].copy_from_slice(__input);
11172            Bytes::new(&payload_buf)
11173        } else {
11174            Bytes::new(__input)
11175        };
11176        let mut __struct = Self::default();
11177        __struct.time_boot_ms = buf.get_u32_le();
11178        __struct.value = buf.get_f32_le();
11179        __struct.ind = buf.get_u8();
11180        Ok(__struct)
11181    }
11182    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11183        let mut __tmp = BytesMut::new(bytes);
11184        #[allow(clippy::absurd_extreme_comparisons)]
11185        #[allow(unused_comparisons)]
11186        if __tmp.remaining() < Self::ENCODED_LEN {
11187            panic!(
11188                "buffer is too small (need {} bytes, but got {})",
11189                Self::ENCODED_LEN,
11190                __tmp.remaining(),
11191            )
11192        }
11193        __tmp.put_u32_le(self.time_boot_ms);
11194        __tmp.put_f32_le(self.value);
11195        __tmp.put_u8(self.ind);
11196        if matches!(version, MavlinkVersion::V2) {
11197            let len = __tmp.len();
11198            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11199        } else {
11200            __tmp.len()
11201        }
11202    }
11203}
11204#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
11205#[doc = ""]
11206#[doc = "ID: 350"]
11207#[derive(Debug, Clone, PartialEq)]
11208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11209#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11210#[cfg_attr(feature = "ts", derive(TS))]
11211#[cfg_attr(feature = "ts", ts(export))]
11212pub struct DEBUG_FLOAT_ARRAY_DATA {
11213    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11214    pub time_usec: u64,
11215    #[doc = "Unique ID used to discriminate between arrays"]
11216    pub array_id: u16,
11217    #[doc = "Name, for human-friendly display in a Ground Control Station"]
11218    #[cfg_attr(feature = "ts", ts(type = "string"))]
11219    pub name: CharArray<10>,
11220    #[doc = "data"]
11221    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11222    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11223    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11224    pub data: [f32; 58],
11225}
11226impl DEBUG_FLOAT_ARRAY_DATA {
11227    pub const ENCODED_LEN: usize = 252usize;
11228    pub const DEFAULT: Self = Self {
11229        time_usec: 0_u64,
11230        array_id: 0_u16,
11231        name: CharArray::new([0_u8; 10usize]),
11232        data: [0.0_f32; 58usize],
11233    };
11234    #[cfg(feature = "arbitrary")]
11235    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11236        use arbitrary::{Arbitrary, Unstructured};
11237        let mut buf = [0u8; 1024];
11238        rng.fill_bytes(&mut buf);
11239        let mut unstructured = Unstructured::new(&buf);
11240        Self::arbitrary(&mut unstructured).unwrap_or_default()
11241    }
11242}
11243impl Default for DEBUG_FLOAT_ARRAY_DATA {
11244    fn default() -> Self {
11245        Self::DEFAULT.clone()
11246    }
11247}
11248impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
11249    type Message = MavMessage;
11250    const ID: u32 = 350u32;
11251    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
11252    const EXTRA_CRC: u8 = 232u8;
11253    const ENCODED_LEN: usize = 252usize;
11254    fn deser(
11255        _version: MavlinkVersion,
11256        __input: &[u8],
11257    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11258        let avail_len = __input.len();
11259        let mut payload_buf = [0; Self::ENCODED_LEN];
11260        let mut buf = if avail_len < Self::ENCODED_LEN {
11261            payload_buf[0..avail_len].copy_from_slice(__input);
11262            Bytes::new(&payload_buf)
11263        } else {
11264            Bytes::new(__input)
11265        };
11266        let mut __struct = Self::default();
11267        __struct.time_usec = buf.get_u64_le();
11268        __struct.array_id = buf.get_u16_le();
11269        let mut tmp = [0_u8; 10usize];
11270        for v in &mut tmp {
11271            *v = buf.get_u8();
11272        }
11273        __struct.name = CharArray::new(tmp);
11274        for v in &mut __struct.data {
11275            let val = buf.get_f32_le();
11276            *v = val;
11277        }
11278        Ok(__struct)
11279    }
11280    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11281        let mut __tmp = BytesMut::new(bytes);
11282        #[allow(clippy::absurd_extreme_comparisons)]
11283        #[allow(unused_comparisons)]
11284        if __tmp.remaining() < Self::ENCODED_LEN {
11285            panic!(
11286                "buffer is too small (need {} bytes, but got {})",
11287                Self::ENCODED_LEN,
11288                __tmp.remaining(),
11289            )
11290        }
11291        __tmp.put_u64_le(self.time_usec);
11292        __tmp.put_u16_le(self.array_id);
11293        for val in &self.name {
11294            __tmp.put_u8(*val);
11295        }
11296        if matches!(version, MavlinkVersion::V2) {
11297            for val in &self.data {
11298                __tmp.put_f32_le(*val);
11299            }
11300            let len = __tmp.len();
11301            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11302        } else {
11303            __tmp.len()
11304        }
11305    }
11306}
11307#[doc = "To debug something using a named 3D vector."]
11308#[doc = ""]
11309#[doc = "ID: 250"]
11310#[derive(Debug, Clone, PartialEq)]
11311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11312#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11313#[cfg_attr(feature = "ts", derive(TS))]
11314#[cfg_attr(feature = "ts", ts(export))]
11315pub struct DEBUG_VECT_DATA {
11316    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11317    pub time_usec: u64,
11318    #[doc = "x"]
11319    pub x: f32,
11320    #[doc = "y"]
11321    pub y: f32,
11322    #[doc = "z"]
11323    pub z: f32,
11324    #[doc = "Name"]
11325    #[cfg_attr(feature = "ts", ts(type = "string"))]
11326    pub name: CharArray<10>,
11327}
11328impl DEBUG_VECT_DATA {
11329    pub const ENCODED_LEN: usize = 30usize;
11330    pub const DEFAULT: Self = Self {
11331        time_usec: 0_u64,
11332        x: 0.0_f32,
11333        y: 0.0_f32,
11334        z: 0.0_f32,
11335        name: CharArray::new([0_u8; 10usize]),
11336    };
11337    #[cfg(feature = "arbitrary")]
11338    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11339        use arbitrary::{Arbitrary, Unstructured};
11340        let mut buf = [0u8; 1024];
11341        rng.fill_bytes(&mut buf);
11342        let mut unstructured = Unstructured::new(&buf);
11343        Self::arbitrary(&mut unstructured).unwrap_or_default()
11344    }
11345}
11346impl Default for DEBUG_VECT_DATA {
11347    fn default() -> Self {
11348        Self::DEFAULT.clone()
11349    }
11350}
11351impl MessageData for DEBUG_VECT_DATA {
11352    type Message = MavMessage;
11353    const ID: u32 = 250u32;
11354    const NAME: &'static str = "DEBUG_VECT";
11355    const EXTRA_CRC: u8 = 49u8;
11356    const ENCODED_LEN: usize = 30usize;
11357    fn deser(
11358        _version: MavlinkVersion,
11359        __input: &[u8],
11360    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11361        let avail_len = __input.len();
11362        let mut payload_buf = [0; Self::ENCODED_LEN];
11363        let mut buf = if avail_len < Self::ENCODED_LEN {
11364            payload_buf[0..avail_len].copy_from_slice(__input);
11365            Bytes::new(&payload_buf)
11366        } else {
11367            Bytes::new(__input)
11368        };
11369        let mut __struct = Self::default();
11370        __struct.time_usec = buf.get_u64_le();
11371        __struct.x = buf.get_f32_le();
11372        __struct.y = buf.get_f32_le();
11373        __struct.z = buf.get_f32_le();
11374        let mut tmp = [0_u8; 10usize];
11375        for v in &mut tmp {
11376            *v = buf.get_u8();
11377        }
11378        __struct.name = CharArray::new(tmp);
11379        Ok(__struct)
11380    }
11381    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11382        let mut __tmp = BytesMut::new(bytes);
11383        #[allow(clippy::absurd_extreme_comparisons)]
11384        #[allow(unused_comparisons)]
11385        if __tmp.remaining() < Self::ENCODED_LEN {
11386            panic!(
11387                "buffer is too small (need {} bytes, but got {})",
11388                Self::ENCODED_LEN,
11389                __tmp.remaining(),
11390            )
11391        }
11392        __tmp.put_u64_le(self.time_usec);
11393        __tmp.put_f32_le(self.x);
11394        __tmp.put_f32_le(self.y);
11395        __tmp.put_f32_le(self.z);
11396        for val in &self.name {
11397            __tmp.put_u8(*val);
11398        }
11399        if matches!(version, MavlinkVersion::V2) {
11400            let len = __tmp.len();
11401            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11402        } else {
11403            __tmp.len()
11404        }
11405    }
11406}
11407#[doc = "Distance sensor information for an onboard rangefinder."]
11408#[doc = ""]
11409#[doc = "ID: 132"]
11410#[derive(Debug, Clone, PartialEq)]
11411#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11412#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11413#[cfg_attr(feature = "ts", derive(TS))]
11414#[cfg_attr(feature = "ts", ts(export))]
11415pub struct DISTANCE_SENSOR_DATA {
11416    #[doc = "Timestamp (time since system boot)."]
11417    pub time_boot_ms: u32,
11418    #[doc = "Minimum distance the sensor can measure"]
11419    pub min_distance: u16,
11420    #[doc = "Maximum distance the sensor can measure"]
11421    pub max_distance: u16,
11422    #[doc = "Current distance reading"]
11423    pub current_distance: u16,
11424    #[doc = "Type of distance sensor."]
11425    pub mavtype: MavDistanceSensor,
11426    #[doc = "Onboard ID of the sensor"]
11427    pub id: u8,
11428    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
11429    pub orientation: MavSensorOrientation,
11430    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
11431    pub covariance: u8,
11432    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11433    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11434    pub horizontal_fov: f32,
11435    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11436    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11437    pub vertical_fov: f32,
11438    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
11439    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11440    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11441    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11442    pub quaternion: [f32; 4],
11443    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
11444    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11445    pub signal_quality: u8,
11446}
11447impl DISTANCE_SENSOR_DATA {
11448    pub const ENCODED_LEN: usize = 39usize;
11449    pub const DEFAULT: Self = Self {
11450        time_boot_ms: 0_u32,
11451        min_distance: 0_u16,
11452        max_distance: 0_u16,
11453        current_distance: 0_u16,
11454        mavtype: MavDistanceSensor::DEFAULT,
11455        id: 0_u8,
11456        orientation: MavSensorOrientation::DEFAULT,
11457        covariance: 0_u8,
11458        horizontal_fov: 0.0_f32,
11459        vertical_fov: 0.0_f32,
11460        quaternion: [0.0_f32; 4usize],
11461        signal_quality: 0_u8,
11462    };
11463    #[cfg(feature = "arbitrary")]
11464    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11465        use arbitrary::{Arbitrary, Unstructured};
11466        let mut buf = [0u8; 1024];
11467        rng.fill_bytes(&mut buf);
11468        let mut unstructured = Unstructured::new(&buf);
11469        Self::arbitrary(&mut unstructured).unwrap_or_default()
11470    }
11471}
11472impl Default for DISTANCE_SENSOR_DATA {
11473    fn default() -> Self {
11474        Self::DEFAULT.clone()
11475    }
11476}
11477impl MessageData for DISTANCE_SENSOR_DATA {
11478    type Message = MavMessage;
11479    const ID: u32 = 132u32;
11480    const NAME: &'static str = "DISTANCE_SENSOR";
11481    const EXTRA_CRC: u8 = 85u8;
11482    const ENCODED_LEN: usize = 39usize;
11483    fn deser(
11484        _version: MavlinkVersion,
11485        __input: &[u8],
11486    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11487        let avail_len = __input.len();
11488        let mut payload_buf = [0; Self::ENCODED_LEN];
11489        let mut buf = if avail_len < Self::ENCODED_LEN {
11490            payload_buf[0..avail_len].copy_from_slice(__input);
11491            Bytes::new(&payload_buf)
11492        } else {
11493            Bytes::new(__input)
11494        };
11495        let mut __struct = Self::default();
11496        __struct.time_boot_ms = buf.get_u32_le();
11497        __struct.min_distance = buf.get_u16_le();
11498        __struct.max_distance = buf.get_u16_le();
11499        __struct.current_distance = buf.get_u16_le();
11500        let tmp = buf.get_u8();
11501        __struct.mavtype =
11502            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11503                enum_type: "MavDistanceSensor",
11504                value: tmp as u64,
11505            })?;
11506        __struct.id = buf.get_u8();
11507        let tmp = buf.get_u8();
11508        __struct.orientation =
11509            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11510                enum_type: "MavSensorOrientation",
11511                value: tmp as u64,
11512            })?;
11513        __struct.covariance = buf.get_u8();
11514        __struct.horizontal_fov = buf.get_f32_le();
11515        __struct.vertical_fov = buf.get_f32_le();
11516        for v in &mut __struct.quaternion {
11517            let val = buf.get_f32_le();
11518            *v = val;
11519        }
11520        __struct.signal_quality = buf.get_u8();
11521        Ok(__struct)
11522    }
11523    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11524        let mut __tmp = BytesMut::new(bytes);
11525        #[allow(clippy::absurd_extreme_comparisons)]
11526        #[allow(unused_comparisons)]
11527        if __tmp.remaining() < Self::ENCODED_LEN {
11528            panic!(
11529                "buffer is too small (need {} bytes, but got {})",
11530                Self::ENCODED_LEN,
11531                __tmp.remaining(),
11532            )
11533        }
11534        __tmp.put_u32_le(self.time_boot_ms);
11535        __tmp.put_u16_le(self.min_distance);
11536        __tmp.put_u16_le(self.max_distance);
11537        __tmp.put_u16_le(self.current_distance);
11538        __tmp.put_u8(self.mavtype as u8);
11539        __tmp.put_u8(self.id);
11540        __tmp.put_u8(self.orientation as u8);
11541        __tmp.put_u8(self.covariance);
11542        if matches!(version, MavlinkVersion::V2) {
11543            __tmp.put_f32_le(self.horizontal_fov);
11544            __tmp.put_f32_le(self.vertical_fov);
11545            for val in &self.quaternion {
11546                __tmp.put_f32_le(*val);
11547            }
11548            __tmp.put_u8(self.signal_quality);
11549            let len = __tmp.len();
11550            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11551        } else {
11552            __tmp.len()
11553        }
11554    }
11555}
11556#[doc = "EFI status output."]
11557#[doc = ""]
11558#[doc = "ID: 225"]
11559#[derive(Debug, Clone, PartialEq)]
11560#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11561#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11562#[cfg_attr(feature = "ts", derive(TS))]
11563#[cfg_attr(feature = "ts", ts(export))]
11564pub struct EFI_STATUS_DATA {
11565    #[doc = "ECU index"]
11566    pub ecu_index: f32,
11567    #[doc = "RPM"]
11568    pub rpm: f32,
11569    #[doc = "Fuel consumed"]
11570    pub fuel_consumed: f32,
11571    #[doc = "Fuel flow rate"]
11572    pub fuel_flow: f32,
11573    #[doc = "Engine load"]
11574    pub engine_load: f32,
11575    #[doc = "Throttle position"]
11576    pub throttle_position: f32,
11577    #[doc = "Spark dwell time"]
11578    pub spark_dwell_time: f32,
11579    #[doc = "Barometric pressure"]
11580    pub barometric_pressure: f32,
11581    #[doc = "Intake manifold pressure("]
11582    pub intake_manifold_pressure: f32,
11583    #[doc = "Intake manifold temperature"]
11584    pub intake_manifold_temperature: f32,
11585    #[doc = "Cylinder head temperature"]
11586    pub cylinder_head_temperature: f32,
11587    #[doc = "Ignition timing (Crank angle degrees)"]
11588    pub ignition_timing: f32,
11589    #[doc = "Injection time"]
11590    pub injection_time: f32,
11591    #[doc = "Exhaust gas temperature"]
11592    pub exhaust_gas_temperature: f32,
11593    #[doc = "Output throttle"]
11594    pub throttle_out: f32,
11595    #[doc = "Pressure/temperature compensation"]
11596    pub pt_compensation: f32,
11597    #[doc = "EFI health status"]
11598    pub health: u8,
11599    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
11600    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11601    pub ignition_voltage: f32,
11602    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
11603    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11604    pub fuel_pressure: f32,
11605}
11606impl EFI_STATUS_DATA {
11607    pub const ENCODED_LEN: usize = 73usize;
11608    pub const DEFAULT: Self = Self {
11609        ecu_index: 0.0_f32,
11610        rpm: 0.0_f32,
11611        fuel_consumed: 0.0_f32,
11612        fuel_flow: 0.0_f32,
11613        engine_load: 0.0_f32,
11614        throttle_position: 0.0_f32,
11615        spark_dwell_time: 0.0_f32,
11616        barometric_pressure: 0.0_f32,
11617        intake_manifold_pressure: 0.0_f32,
11618        intake_manifold_temperature: 0.0_f32,
11619        cylinder_head_temperature: 0.0_f32,
11620        ignition_timing: 0.0_f32,
11621        injection_time: 0.0_f32,
11622        exhaust_gas_temperature: 0.0_f32,
11623        throttle_out: 0.0_f32,
11624        pt_compensation: 0.0_f32,
11625        health: 0_u8,
11626        ignition_voltage: 0.0_f32,
11627        fuel_pressure: 0.0_f32,
11628    };
11629    #[cfg(feature = "arbitrary")]
11630    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11631        use arbitrary::{Arbitrary, Unstructured};
11632        let mut buf = [0u8; 1024];
11633        rng.fill_bytes(&mut buf);
11634        let mut unstructured = Unstructured::new(&buf);
11635        Self::arbitrary(&mut unstructured).unwrap_or_default()
11636    }
11637}
11638impl Default for EFI_STATUS_DATA {
11639    fn default() -> Self {
11640        Self::DEFAULT.clone()
11641    }
11642}
11643impl MessageData for EFI_STATUS_DATA {
11644    type Message = MavMessage;
11645    const ID: u32 = 225u32;
11646    const NAME: &'static str = "EFI_STATUS";
11647    const EXTRA_CRC: u8 = 208u8;
11648    const ENCODED_LEN: usize = 73usize;
11649    fn deser(
11650        _version: MavlinkVersion,
11651        __input: &[u8],
11652    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11653        let avail_len = __input.len();
11654        let mut payload_buf = [0; Self::ENCODED_LEN];
11655        let mut buf = if avail_len < Self::ENCODED_LEN {
11656            payload_buf[0..avail_len].copy_from_slice(__input);
11657            Bytes::new(&payload_buf)
11658        } else {
11659            Bytes::new(__input)
11660        };
11661        let mut __struct = Self::default();
11662        __struct.ecu_index = buf.get_f32_le();
11663        __struct.rpm = buf.get_f32_le();
11664        __struct.fuel_consumed = buf.get_f32_le();
11665        __struct.fuel_flow = buf.get_f32_le();
11666        __struct.engine_load = buf.get_f32_le();
11667        __struct.throttle_position = buf.get_f32_le();
11668        __struct.spark_dwell_time = buf.get_f32_le();
11669        __struct.barometric_pressure = buf.get_f32_le();
11670        __struct.intake_manifold_pressure = buf.get_f32_le();
11671        __struct.intake_manifold_temperature = buf.get_f32_le();
11672        __struct.cylinder_head_temperature = buf.get_f32_le();
11673        __struct.ignition_timing = buf.get_f32_le();
11674        __struct.injection_time = buf.get_f32_le();
11675        __struct.exhaust_gas_temperature = buf.get_f32_le();
11676        __struct.throttle_out = buf.get_f32_le();
11677        __struct.pt_compensation = buf.get_f32_le();
11678        __struct.health = buf.get_u8();
11679        __struct.ignition_voltage = buf.get_f32_le();
11680        __struct.fuel_pressure = buf.get_f32_le();
11681        Ok(__struct)
11682    }
11683    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11684        let mut __tmp = BytesMut::new(bytes);
11685        #[allow(clippy::absurd_extreme_comparisons)]
11686        #[allow(unused_comparisons)]
11687        if __tmp.remaining() < Self::ENCODED_LEN {
11688            panic!(
11689                "buffer is too small (need {} bytes, but got {})",
11690                Self::ENCODED_LEN,
11691                __tmp.remaining(),
11692            )
11693        }
11694        __tmp.put_f32_le(self.ecu_index);
11695        __tmp.put_f32_le(self.rpm);
11696        __tmp.put_f32_le(self.fuel_consumed);
11697        __tmp.put_f32_le(self.fuel_flow);
11698        __tmp.put_f32_le(self.engine_load);
11699        __tmp.put_f32_le(self.throttle_position);
11700        __tmp.put_f32_le(self.spark_dwell_time);
11701        __tmp.put_f32_le(self.barometric_pressure);
11702        __tmp.put_f32_le(self.intake_manifold_pressure);
11703        __tmp.put_f32_le(self.intake_manifold_temperature);
11704        __tmp.put_f32_le(self.cylinder_head_temperature);
11705        __tmp.put_f32_le(self.ignition_timing);
11706        __tmp.put_f32_le(self.injection_time);
11707        __tmp.put_f32_le(self.exhaust_gas_temperature);
11708        __tmp.put_f32_le(self.throttle_out);
11709        __tmp.put_f32_le(self.pt_compensation);
11710        __tmp.put_u8(self.health);
11711        if matches!(version, MavlinkVersion::V2) {
11712            __tmp.put_f32_le(self.ignition_voltage);
11713            __tmp.put_f32_le(self.fuel_pressure);
11714            let len = __tmp.len();
11715            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11716        } else {
11717            __tmp.len()
11718        }
11719    }
11720}
11721#[doc = "Extended EKF state estimates for ASLUAVs."]
11722#[doc = ""]
11723#[doc = "ID: 8007"]
11724#[derive(Debug, Clone, PartialEq)]
11725#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11726#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11727#[cfg_attr(feature = "ts", derive(TS))]
11728#[cfg_attr(feature = "ts", ts(export))]
11729pub struct EKF_EXT_DATA {
11730    #[doc = "Time since system start"]
11731    pub timestamp: u64,
11732    #[doc = "Magnitude of wind velocity (in lateral inertial plane)"]
11733    pub Windspeed: f32,
11734    #[doc = "Wind heading angle from North"]
11735    pub WindDir: f32,
11736    #[doc = "Z (Down) component of inertial wind velocity"]
11737    pub WindZ: f32,
11738    #[doc = "Magnitude of air velocity"]
11739    pub Airspeed: f32,
11740    #[doc = "Sideslip angle"]
11741    pub beta: f32,
11742    #[doc = "Angle of attack"]
11743    pub alpha: f32,
11744}
11745impl EKF_EXT_DATA {
11746    pub const ENCODED_LEN: usize = 32usize;
11747    pub const DEFAULT: Self = Self {
11748        timestamp: 0_u64,
11749        Windspeed: 0.0_f32,
11750        WindDir: 0.0_f32,
11751        WindZ: 0.0_f32,
11752        Airspeed: 0.0_f32,
11753        beta: 0.0_f32,
11754        alpha: 0.0_f32,
11755    };
11756    #[cfg(feature = "arbitrary")]
11757    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11758        use arbitrary::{Arbitrary, Unstructured};
11759        let mut buf = [0u8; 1024];
11760        rng.fill_bytes(&mut buf);
11761        let mut unstructured = Unstructured::new(&buf);
11762        Self::arbitrary(&mut unstructured).unwrap_or_default()
11763    }
11764}
11765impl Default for EKF_EXT_DATA {
11766    fn default() -> Self {
11767        Self::DEFAULT.clone()
11768    }
11769}
11770impl MessageData for EKF_EXT_DATA {
11771    type Message = MavMessage;
11772    const ID: u32 = 8007u32;
11773    const NAME: &'static str = "EKF_EXT";
11774    const EXTRA_CRC: u8 = 64u8;
11775    const ENCODED_LEN: usize = 32usize;
11776    fn deser(
11777        _version: MavlinkVersion,
11778        __input: &[u8],
11779    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11780        let avail_len = __input.len();
11781        let mut payload_buf = [0; Self::ENCODED_LEN];
11782        let mut buf = if avail_len < Self::ENCODED_LEN {
11783            payload_buf[0..avail_len].copy_from_slice(__input);
11784            Bytes::new(&payload_buf)
11785        } else {
11786            Bytes::new(__input)
11787        };
11788        let mut __struct = Self::default();
11789        __struct.timestamp = buf.get_u64_le();
11790        __struct.Windspeed = buf.get_f32_le();
11791        __struct.WindDir = buf.get_f32_le();
11792        __struct.WindZ = buf.get_f32_le();
11793        __struct.Airspeed = buf.get_f32_le();
11794        __struct.beta = buf.get_f32_le();
11795        __struct.alpha = buf.get_f32_le();
11796        Ok(__struct)
11797    }
11798    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11799        let mut __tmp = BytesMut::new(bytes);
11800        #[allow(clippy::absurd_extreme_comparisons)]
11801        #[allow(unused_comparisons)]
11802        if __tmp.remaining() < Self::ENCODED_LEN {
11803            panic!(
11804                "buffer is too small (need {} bytes, but got {})",
11805                Self::ENCODED_LEN,
11806                __tmp.remaining(),
11807            )
11808        }
11809        __tmp.put_u64_le(self.timestamp);
11810        __tmp.put_f32_le(self.Windspeed);
11811        __tmp.put_f32_le(self.WindDir);
11812        __tmp.put_f32_le(self.WindZ);
11813        __tmp.put_f32_le(self.Airspeed);
11814        __tmp.put_f32_le(self.beta);
11815        __tmp.put_f32_le(self.alpha);
11816        if matches!(version, MavlinkVersion::V2) {
11817            let len = __tmp.len();
11818            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11819        } else {
11820            __tmp.len()
11821        }
11822    }
11823}
11824#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11825#[doc = ""]
11826#[doc = "ID: 131"]
11827#[derive(Debug, Clone, PartialEq)]
11828#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11829#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11830#[cfg_attr(feature = "ts", derive(TS))]
11831#[cfg_attr(feature = "ts", ts(export))]
11832pub struct ENCAPSULATED_DATA_DATA {
11833    #[doc = "sequence number (starting with 0 on every transmission)"]
11834    pub seqnr: u16,
11835    #[doc = "image data bytes"]
11836    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11837    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11838    pub data: [u8; 253],
11839}
11840impl ENCAPSULATED_DATA_DATA {
11841    pub const ENCODED_LEN: usize = 255usize;
11842    pub const DEFAULT: Self = Self {
11843        seqnr: 0_u16,
11844        data: [0_u8; 253usize],
11845    };
11846    #[cfg(feature = "arbitrary")]
11847    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11848        use arbitrary::{Arbitrary, Unstructured};
11849        let mut buf = [0u8; 1024];
11850        rng.fill_bytes(&mut buf);
11851        let mut unstructured = Unstructured::new(&buf);
11852        Self::arbitrary(&mut unstructured).unwrap_or_default()
11853    }
11854}
11855impl Default for ENCAPSULATED_DATA_DATA {
11856    fn default() -> Self {
11857        Self::DEFAULT.clone()
11858    }
11859}
11860impl MessageData for ENCAPSULATED_DATA_DATA {
11861    type Message = MavMessage;
11862    const ID: u32 = 131u32;
11863    const NAME: &'static str = "ENCAPSULATED_DATA";
11864    const EXTRA_CRC: u8 = 223u8;
11865    const ENCODED_LEN: usize = 255usize;
11866    fn deser(
11867        _version: MavlinkVersion,
11868        __input: &[u8],
11869    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11870        let avail_len = __input.len();
11871        let mut payload_buf = [0; Self::ENCODED_LEN];
11872        let mut buf = if avail_len < Self::ENCODED_LEN {
11873            payload_buf[0..avail_len].copy_from_slice(__input);
11874            Bytes::new(&payload_buf)
11875        } else {
11876            Bytes::new(__input)
11877        };
11878        let mut __struct = Self::default();
11879        __struct.seqnr = buf.get_u16_le();
11880        for v in &mut __struct.data {
11881            let val = buf.get_u8();
11882            *v = val;
11883        }
11884        Ok(__struct)
11885    }
11886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11887        let mut __tmp = BytesMut::new(bytes);
11888        #[allow(clippy::absurd_extreme_comparisons)]
11889        #[allow(unused_comparisons)]
11890        if __tmp.remaining() < Self::ENCODED_LEN {
11891            panic!(
11892                "buffer is too small (need {} bytes, but got {})",
11893                Self::ENCODED_LEN,
11894                __tmp.remaining(),
11895            )
11896        }
11897        __tmp.put_u16_le(self.seqnr);
11898        for val in &self.data {
11899            __tmp.put_u8(*val);
11900        }
11901        if matches!(version, MavlinkVersion::V2) {
11902            let len = __tmp.len();
11903            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11904        } else {
11905            __tmp.len()
11906        }
11907    }
11908}
11909#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11910#[doc = ""]
11911#[doc = "ID: 290"]
11912#[derive(Debug, Clone, PartialEq)]
11913#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11914#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11915#[cfg_attr(feature = "ts", derive(TS))]
11916#[cfg_attr(feature = "ts", ts(export))]
11917pub struct ESC_INFO_DATA {
11918    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11919    pub time_usec: u64,
11920    #[doc = "Number of reported errors by each ESC since boot."]
11921    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11922    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11923    pub error_count: [u32; 4],
11924    #[doc = "Counter of data packets received."]
11925    pub counter: u16,
11926    #[doc = "Bitmap of ESC failure flags."]
11927    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11928    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11929    pub failure_flags: [u16; 4],
11930    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11931    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11932    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11933    pub temperature: [i16; 4],
11934    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11935    pub index: u8,
11936    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11937    pub count: u8,
11938    #[doc = "Connection type protocol for all ESC."]
11939    pub connection_type: EscConnectionType,
11940    #[doc = "Information regarding online/offline status of each ESC."]
11941    pub info: u8,
11942}
11943impl ESC_INFO_DATA {
11944    pub const ENCODED_LEN: usize = 46usize;
11945    pub const DEFAULT: Self = Self {
11946        time_usec: 0_u64,
11947        error_count: [0_u32; 4usize],
11948        counter: 0_u16,
11949        failure_flags: [0_u16; 4usize],
11950        temperature: [0_i16; 4usize],
11951        index: 0_u8,
11952        count: 0_u8,
11953        connection_type: EscConnectionType::DEFAULT,
11954        info: 0_u8,
11955    };
11956    #[cfg(feature = "arbitrary")]
11957    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11958        use arbitrary::{Arbitrary, Unstructured};
11959        let mut buf = [0u8; 1024];
11960        rng.fill_bytes(&mut buf);
11961        let mut unstructured = Unstructured::new(&buf);
11962        Self::arbitrary(&mut unstructured).unwrap_or_default()
11963    }
11964}
11965impl Default for ESC_INFO_DATA {
11966    fn default() -> Self {
11967        Self::DEFAULT.clone()
11968    }
11969}
11970impl MessageData for ESC_INFO_DATA {
11971    type Message = MavMessage;
11972    const ID: u32 = 290u32;
11973    const NAME: &'static str = "ESC_INFO";
11974    const EXTRA_CRC: u8 = 251u8;
11975    const ENCODED_LEN: usize = 46usize;
11976    fn deser(
11977        _version: MavlinkVersion,
11978        __input: &[u8],
11979    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11980        let avail_len = __input.len();
11981        let mut payload_buf = [0; Self::ENCODED_LEN];
11982        let mut buf = if avail_len < Self::ENCODED_LEN {
11983            payload_buf[0..avail_len].copy_from_slice(__input);
11984            Bytes::new(&payload_buf)
11985        } else {
11986            Bytes::new(__input)
11987        };
11988        let mut __struct = Self::default();
11989        __struct.time_usec = buf.get_u64_le();
11990        for v in &mut __struct.error_count {
11991            let val = buf.get_u32_le();
11992            *v = val;
11993        }
11994        __struct.counter = buf.get_u16_le();
11995        for v in &mut __struct.failure_flags {
11996            let val = buf.get_u16_le();
11997            *v = val;
11998        }
11999        for v in &mut __struct.temperature {
12000            let val = buf.get_i16_le();
12001            *v = val;
12002        }
12003        __struct.index = buf.get_u8();
12004        __struct.count = buf.get_u8();
12005        let tmp = buf.get_u8();
12006        __struct.connection_type =
12007            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12008                enum_type: "EscConnectionType",
12009                value: tmp as u64,
12010            })?;
12011        __struct.info = buf.get_u8();
12012        Ok(__struct)
12013    }
12014    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12015        let mut __tmp = BytesMut::new(bytes);
12016        #[allow(clippy::absurd_extreme_comparisons)]
12017        #[allow(unused_comparisons)]
12018        if __tmp.remaining() < Self::ENCODED_LEN {
12019            panic!(
12020                "buffer is too small (need {} bytes, but got {})",
12021                Self::ENCODED_LEN,
12022                __tmp.remaining(),
12023            )
12024        }
12025        __tmp.put_u64_le(self.time_usec);
12026        for val in &self.error_count {
12027            __tmp.put_u32_le(*val);
12028        }
12029        __tmp.put_u16_le(self.counter);
12030        for val in &self.failure_flags {
12031            __tmp.put_u16_le(*val);
12032        }
12033        for val in &self.temperature {
12034            __tmp.put_i16_le(*val);
12035        }
12036        __tmp.put_u8(self.index);
12037        __tmp.put_u8(self.count);
12038        __tmp.put_u8(self.connection_type as u8);
12039        __tmp.put_u8(self.info);
12040        if matches!(version, MavlinkVersion::V2) {
12041            let len = __tmp.len();
12042            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12043        } else {
12044            __tmp.len()
12045        }
12046    }
12047}
12048#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
12049#[doc = ""]
12050#[doc = "ID: 291"]
12051#[derive(Debug, Clone, PartialEq)]
12052#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12054#[cfg_attr(feature = "ts", derive(TS))]
12055#[cfg_attr(feature = "ts", ts(export))]
12056pub struct ESC_STATUS_DATA {
12057    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
12058    pub time_usec: u64,
12059    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
12060    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12061    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12062    pub rpm: [i32; 4],
12063    #[doc = "Voltage measured from each ESC."]
12064    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12065    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12066    pub voltage: [f32; 4],
12067    #[doc = "Current measured from each ESC."]
12068    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12069    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12070    pub current: [f32; 4],
12071    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
12072    pub index: u8,
12073}
12074impl ESC_STATUS_DATA {
12075    pub const ENCODED_LEN: usize = 57usize;
12076    pub const DEFAULT: Self = Self {
12077        time_usec: 0_u64,
12078        rpm: [0_i32; 4usize],
12079        voltage: [0.0_f32; 4usize],
12080        current: [0.0_f32; 4usize],
12081        index: 0_u8,
12082    };
12083    #[cfg(feature = "arbitrary")]
12084    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12085        use arbitrary::{Arbitrary, Unstructured};
12086        let mut buf = [0u8; 1024];
12087        rng.fill_bytes(&mut buf);
12088        let mut unstructured = Unstructured::new(&buf);
12089        Self::arbitrary(&mut unstructured).unwrap_or_default()
12090    }
12091}
12092impl Default for ESC_STATUS_DATA {
12093    fn default() -> Self {
12094        Self::DEFAULT.clone()
12095    }
12096}
12097impl MessageData for ESC_STATUS_DATA {
12098    type Message = MavMessage;
12099    const ID: u32 = 291u32;
12100    const NAME: &'static str = "ESC_STATUS";
12101    const EXTRA_CRC: u8 = 10u8;
12102    const ENCODED_LEN: usize = 57usize;
12103    fn deser(
12104        _version: MavlinkVersion,
12105        __input: &[u8],
12106    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12107        let avail_len = __input.len();
12108        let mut payload_buf = [0; Self::ENCODED_LEN];
12109        let mut buf = if avail_len < Self::ENCODED_LEN {
12110            payload_buf[0..avail_len].copy_from_slice(__input);
12111            Bytes::new(&payload_buf)
12112        } else {
12113            Bytes::new(__input)
12114        };
12115        let mut __struct = Self::default();
12116        __struct.time_usec = buf.get_u64_le();
12117        for v in &mut __struct.rpm {
12118            let val = buf.get_i32_le();
12119            *v = val;
12120        }
12121        for v in &mut __struct.voltage {
12122            let val = buf.get_f32_le();
12123            *v = val;
12124        }
12125        for v in &mut __struct.current {
12126            let val = buf.get_f32_le();
12127            *v = val;
12128        }
12129        __struct.index = buf.get_u8();
12130        Ok(__struct)
12131    }
12132    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12133        let mut __tmp = BytesMut::new(bytes);
12134        #[allow(clippy::absurd_extreme_comparisons)]
12135        #[allow(unused_comparisons)]
12136        if __tmp.remaining() < Self::ENCODED_LEN {
12137            panic!(
12138                "buffer is too small (need {} bytes, but got {})",
12139                Self::ENCODED_LEN,
12140                __tmp.remaining(),
12141            )
12142        }
12143        __tmp.put_u64_le(self.time_usec);
12144        for val in &self.rpm {
12145            __tmp.put_i32_le(*val);
12146        }
12147        for val in &self.voltage {
12148            __tmp.put_f32_le(*val);
12149        }
12150        for val in &self.current {
12151            __tmp.put_f32_le(*val);
12152        }
12153        __tmp.put_u8(self.index);
12154        if matches!(version, MavlinkVersion::V2) {
12155            let len = __tmp.len();
12156            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12157        } else {
12158            __tmp.len()
12159        }
12160    }
12161}
12162#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
12163#[doc = ""]
12164#[doc = "ID: 230"]
12165#[derive(Debug, Clone, PartialEq)]
12166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12168#[cfg_attr(feature = "ts", derive(TS))]
12169#[cfg_attr(feature = "ts", ts(export))]
12170pub struct ESTIMATOR_STATUS_DATA {
12171    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12172    pub time_usec: u64,
12173    #[doc = "Velocity innovation test ratio"]
12174    pub vel_ratio: f32,
12175    #[doc = "Horizontal position innovation test ratio"]
12176    pub pos_horiz_ratio: f32,
12177    #[doc = "Vertical position innovation test ratio"]
12178    pub pos_vert_ratio: f32,
12179    #[doc = "Magnetometer innovation test ratio"]
12180    pub mag_ratio: f32,
12181    #[doc = "Height above terrain innovation test ratio"]
12182    pub hagl_ratio: f32,
12183    #[doc = "True airspeed innovation test ratio"]
12184    pub tas_ratio: f32,
12185    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
12186    pub pos_horiz_accuracy: f32,
12187    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
12188    pub pos_vert_accuracy: f32,
12189    #[doc = "Bitmap indicating which EKF outputs are valid."]
12190    pub flags: EstimatorStatusFlags,
12191}
12192impl ESTIMATOR_STATUS_DATA {
12193    pub const ENCODED_LEN: usize = 42usize;
12194    pub const DEFAULT: Self = Self {
12195        time_usec: 0_u64,
12196        vel_ratio: 0.0_f32,
12197        pos_horiz_ratio: 0.0_f32,
12198        pos_vert_ratio: 0.0_f32,
12199        mag_ratio: 0.0_f32,
12200        hagl_ratio: 0.0_f32,
12201        tas_ratio: 0.0_f32,
12202        pos_horiz_accuracy: 0.0_f32,
12203        pos_vert_accuracy: 0.0_f32,
12204        flags: EstimatorStatusFlags::DEFAULT,
12205    };
12206    #[cfg(feature = "arbitrary")]
12207    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12208        use arbitrary::{Arbitrary, Unstructured};
12209        let mut buf = [0u8; 1024];
12210        rng.fill_bytes(&mut buf);
12211        let mut unstructured = Unstructured::new(&buf);
12212        Self::arbitrary(&mut unstructured).unwrap_or_default()
12213    }
12214}
12215impl Default for ESTIMATOR_STATUS_DATA {
12216    fn default() -> Self {
12217        Self::DEFAULT.clone()
12218    }
12219}
12220impl MessageData for ESTIMATOR_STATUS_DATA {
12221    type Message = MavMessage;
12222    const ID: u32 = 230u32;
12223    const NAME: &'static str = "ESTIMATOR_STATUS";
12224    const EXTRA_CRC: u8 = 163u8;
12225    const ENCODED_LEN: usize = 42usize;
12226    fn deser(
12227        _version: MavlinkVersion,
12228        __input: &[u8],
12229    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12230        let avail_len = __input.len();
12231        let mut payload_buf = [0; Self::ENCODED_LEN];
12232        let mut buf = if avail_len < Self::ENCODED_LEN {
12233            payload_buf[0..avail_len].copy_from_slice(__input);
12234            Bytes::new(&payload_buf)
12235        } else {
12236            Bytes::new(__input)
12237        };
12238        let mut __struct = Self::default();
12239        __struct.time_usec = buf.get_u64_le();
12240        __struct.vel_ratio = buf.get_f32_le();
12241        __struct.pos_horiz_ratio = buf.get_f32_le();
12242        __struct.pos_vert_ratio = buf.get_f32_le();
12243        __struct.mag_ratio = buf.get_f32_le();
12244        __struct.hagl_ratio = buf.get_f32_le();
12245        __struct.tas_ratio = buf.get_f32_le();
12246        __struct.pos_horiz_accuracy = buf.get_f32_le();
12247        __struct.pos_vert_accuracy = buf.get_f32_le();
12248        let tmp = buf.get_u16_le();
12249        __struct.flags = EstimatorStatusFlags::from_bits(
12250            tmp as <EstimatorStatusFlags as Flags>::Bits,
12251        )
12252        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12253            flag_type: "EstimatorStatusFlags",
12254            value: tmp as u64,
12255        })?;
12256        Ok(__struct)
12257    }
12258    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12259        let mut __tmp = BytesMut::new(bytes);
12260        #[allow(clippy::absurd_extreme_comparisons)]
12261        #[allow(unused_comparisons)]
12262        if __tmp.remaining() < Self::ENCODED_LEN {
12263            panic!(
12264                "buffer is too small (need {} bytes, but got {})",
12265                Self::ENCODED_LEN,
12266                __tmp.remaining(),
12267            )
12268        }
12269        __tmp.put_u64_le(self.time_usec);
12270        __tmp.put_f32_le(self.vel_ratio);
12271        __tmp.put_f32_le(self.pos_horiz_ratio);
12272        __tmp.put_f32_le(self.pos_vert_ratio);
12273        __tmp.put_f32_le(self.mag_ratio);
12274        __tmp.put_f32_le(self.hagl_ratio);
12275        __tmp.put_f32_le(self.tas_ratio);
12276        __tmp.put_f32_le(self.pos_horiz_accuracy);
12277        __tmp.put_f32_le(self.pos_vert_accuracy);
12278        __tmp.put_u16_le(self.flags.bits() as u16);
12279        if matches!(version, MavlinkVersion::V2) {
12280            let len = __tmp.len();
12281            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12282        } else {
12283            __tmp.len()
12284        }
12285    }
12286}
12287#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
12288#[doc = ""]
12289#[doc = "ID: 410"]
12290#[derive(Debug, Clone, PartialEq)]
12291#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12292#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12293#[cfg_attr(feature = "ts", derive(TS))]
12294#[cfg_attr(feature = "ts", ts(export))]
12295pub struct EVENT_DATA {
12296    #[doc = "Event ID (as defined in the component metadata)"]
12297    pub id: u32,
12298    #[doc = "Timestamp (time since system boot when the event happened)."]
12299    pub event_time_boot_ms: u32,
12300    #[doc = "Sequence number."]
12301    pub sequence: u16,
12302    #[doc = "Component ID"]
12303    pub destination_component: u8,
12304    #[doc = "System ID"]
12305    pub destination_system: u8,
12306    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
12307    pub log_levels: u8,
12308    #[doc = "Arguments (depend on event ID)."]
12309    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12310    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12311    pub arguments: [u8; 40],
12312}
12313impl EVENT_DATA {
12314    pub const ENCODED_LEN: usize = 53usize;
12315    pub const DEFAULT: Self = Self {
12316        id: 0_u32,
12317        event_time_boot_ms: 0_u32,
12318        sequence: 0_u16,
12319        destination_component: 0_u8,
12320        destination_system: 0_u8,
12321        log_levels: 0_u8,
12322        arguments: [0_u8; 40usize],
12323    };
12324    #[cfg(feature = "arbitrary")]
12325    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12326        use arbitrary::{Arbitrary, Unstructured};
12327        let mut buf = [0u8; 1024];
12328        rng.fill_bytes(&mut buf);
12329        let mut unstructured = Unstructured::new(&buf);
12330        Self::arbitrary(&mut unstructured).unwrap_or_default()
12331    }
12332}
12333impl Default for EVENT_DATA {
12334    fn default() -> Self {
12335        Self::DEFAULT.clone()
12336    }
12337}
12338impl MessageData for EVENT_DATA {
12339    type Message = MavMessage;
12340    const ID: u32 = 410u32;
12341    const NAME: &'static str = "EVENT";
12342    const EXTRA_CRC: u8 = 160u8;
12343    const ENCODED_LEN: usize = 53usize;
12344    fn deser(
12345        _version: MavlinkVersion,
12346        __input: &[u8],
12347    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12348        let avail_len = __input.len();
12349        let mut payload_buf = [0; Self::ENCODED_LEN];
12350        let mut buf = if avail_len < Self::ENCODED_LEN {
12351            payload_buf[0..avail_len].copy_from_slice(__input);
12352            Bytes::new(&payload_buf)
12353        } else {
12354            Bytes::new(__input)
12355        };
12356        let mut __struct = Self::default();
12357        __struct.id = buf.get_u32_le();
12358        __struct.event_time_boot_ms = buf.get_u32_le();
12359        __struct.sequence = buf.get_u16_le();
12360        __struct.destination_component = buf.get_u8();
12361        __struct.destination_system = buf.get_u8();
12362        __struct.log_levels = buf.get_u8();
12363        for v in &mut __struct.arguments {
12364            let val = buf.get_u8();
12365            *v = val;
12366        }
12367        Ok(__struct)
12368    }
12369    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12370        let mut __tmp = BytesMut::new(bytes);
12371        #[allow(clippy::absurd_extreme_comparisons)]
12372        #[allow(unused_comparisons)]
12373        if __tmp.remaining() < Self::ENCODED_LEN {
12374            panic!(
12375                "buffer is too small (need {} bytes, but got {})",
12376                Self::ENCODED_LEN,
12377                __tmp.remaining(),
12378            )
12379        }
12380        __tmp.put_u32_le(self.id);
12381        __tmp.put_u32_le(self.event_time_boot_ms);
12382        __tmp.put_u16_le(self.sequence);
12383        __tmp.put_u8(self.destination_component);
12384        __tmp.put_u8(self.destination_system);
12385        __tmp.put_u8(self.log_levels);
12386        for val in &self.arguments {
12387            __tmp.put_u8(*val);
12388        }
12389        if matches!(version, MavlinkVersion::V2) {
12390            let len = __tmp.len();
12391            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12392        } else {
12393            __tmp.len()
12394        }
12395    }
12396}
12397#[doc = "Provides state for additional features."]
12398#[doc = ""]
12399#[doc = "ID: 245"]
12400#[derive(Debug, Clone, PartialEq)]
12401#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12402#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12403#[cfg_attr(feature = "ts", derive(TS))]
12404#[cfg_attr(feature = "ts", ts(export))]
12405pub struct EXTENDED_SYS_STATE_DATA {
12406    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
12407    pub vtol_state: MavVtolState,
12408    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
12409    pub landed_state: MavLandedState,
12410}
12411impl EXTENDED_SYS_STATE_DATA {
12412    pub const ENCODED_LEN: usize = 2usize;
12413    pub const DEFAULT: Self = Self {
12414        vtol_state: MavVtolState::DEFAULT,
12415        landed_state: MavLandedState::DEFAULT,
12416    };
12417    #[cfg(feature = "arbitrary")]
12418    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12419        use arbitrary::{Arbitrary, Unstructured};
12420        let mut buf = [0u8; 1024];
12421        rng.fill_bytes(&mut buf);
12422        let mut unstructured = Unstructured::new(&buf);
12423        Self::arbitrary(&mut unstructured).unwrap_or_default()
12424    }
12425}
12426impl Default for EXTENDED_SYS_STATE_DATA {
12427    fn default() -> Self {
12428        Self::DEFAULT.clone()
12429    }
12430}
12431impl MessageData for EXTENDED_SYS_STATE_DATA {
12432    type Message = MavMessage;
12433    const ID: u32 = 245u32;
12434    const NAME: &'static str = "EXTENDED_SYS_STATE";
12435    const EXTRA_CRC: u8 = 130u8;
12436    const ENCODED_LEN: usize = 2usize;
12437    fn deser(
12438        _version: MavlinkVersion,
12439        __input: &[u8],
12440    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12441        let avail_len = __input.len();
12442        let mut payload_buf = [0; Self::ENCODED_LEN];
12443        let mut buf = if avail_len < Self::ENCODED_LEN {
12444            payload_buf[0..avail_len].copy_from_slice(__input);
12445            Bytes::new(&payload_buf)
12446        } else {
12447            Bytes::new(__input)
12448        };
12449        let mut __struct = Self::default();
12450        let tmp = buf.get_u8();
12451        __struct.vtol_state =
12452            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12453                enum_type: "MavVtolState",
12454                value: tmp as u64,
12455            })?;
12456        let tmp = buf.get_u8();
12457        __struct.landed_state =
12458            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12459                enum_type: "MavLandedState",
12460                value: tmp as u64,
12461            })?;
12462        Ok(__struct)
12463    }
12464    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12465        let mut __tmp = BytesMut::new(bytes);
12466        #[allow(clippy::absurd_extreme_comparisons)]
12467        #[allow(unused_comparisons)]
12468        if __tmp.remaining() < Self::ENCODED_LEN {
12469            panic!(
12470                "buffer is too small (need {} bytes, but got {})",
12471                Self::ENCODED_LEN,
12472                __tmp.remaining(),
12473            )
12474        }
12475        __tmp.put_u8(self.vtol_state as u8);
12476        __tmp.put_u8(self.landed_state as u8);
12477        if matches!(version, MavlinkVersion::V2) {
12478            let len = __tmp.len();
12479            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12480        } else {
12481            __tmp.len()
12482        }
12483    }
12484}
12485#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
12486#[doc = ""]
12487#[doc = "ID: 162"]
12488#[derive(Debug, Clone, PartialEq)]
12489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12491#[cfg_attr(feature = "ts", derive(TS))]
12492#[cfg_attr(feature = "ts", ts(export))]
12493pub struct FENCE_STATUS_DATA {
12494    #[doc = "Time (since boot) of last breach."]
12495    pub breach_time: u32,
12496    #[doc = "Number of fence breaches."]
12497    pub breach_count: u16,
12498    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
12499    pub breach_status: u8,
12500    #[doc = "Last breach type."]
12501    pub breach_type: FenceBreach,
12502    #[doc = "Active action to prevent fence breach"]
12503    #[cfg_attr(feature = "serde", serde(default))]
12504    pub breach_mitigation: FenceMitigate,
12505}
12506impl FENCE_STATUS_DATA {
12507    pub const ENCODED_LEN: usize = 9usize;
12508    pub const DEFAULT: Self = Self {
12509        breach_time: 0_u32,
12510        breach_count: 0_u16,
12511        breach_status: 0_u8,
12512        breach_type: FenceBreach::DEFAULT,
12513        breach_mitigation: FenceMitigate::DEFAULT,
12514    };
12515    #[cfg(feature = "arbitrary")]
12516    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12517        use arbitrary::{Arbitrary, Unstructured};
12518        let mut buf = [0u8; 1024];
12519        rng.fill_bytes(&mut buf);
12520        let mut unstructured = Unstructured::new(&buf);
12521        Self::arbitrary(&mut unstructured).unwrap_or_default()
12522    }
12523}
12524impl Default for FENCE_STATUS_DATA {
12525    fn default() -> Self {
12526        Self::DEFAULT.clone()
12527    }
12528}
12529impl MessageData for FENCE_STATUS_DATA {
12530    type Message = MavMessage;
12531    const ID: u32 = 162u32;
12532    const NAME: &'static str = "FENCE_STATUS";
12533    const EXTRA_CRC: u8 = 189u8;
12534    const ENCODED_LEN: usize = 9usize;
12535    fn deser(
12536        _version: MavlinkVersion,
12537        __input: &[u8],
12538    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12539        let avail_len = __input.len();
12540        let mut payload_buf = [0; Self::ENCODED_LEN];
12541        let mut buf = if avail_len < Self::ENCODED_LEN {
12542            payload_buf[0..avail_len].copy_from_slice(__input);
12543            Bytes::new(&payload_buf)
12544        } else {
12545            Bytes::new(__input)
12546        };
12547        let mut __struct = Self::default();
12548        __struct.breach_time = buf.get_u32_le();
12549        __struct.breach_count = buf.get_u16_le();
12550        __struct.breach_status = buf.get_u8();
12551        let tmp = buf.get_u8();
12552        __struct.breach_type =
12553            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12554                enum_type: "FenceBreach",
12555                value: tmp as u64,
12556            })?;
12557        let tmp = buf.get_u8();
12558        __struct.breach_mitigation =
12559            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12560                enum_type: "FenceMitigate",
12561                value: tmp as u64,
12562            })?;
12563        Ok(__struct)
12564    }
12565    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12566        let mut __tmp = BytesMut::new(bytes);
12567        #[allow(clippy::absurd_extreme_comparisons)]
12568        #[allow(unused_comparisons)]
12569        if __tmp.remaining() < Self::ENCODED_LEN {
12570            panic!(
12571                "buffer is too small (need {} bytes, but got {})",
12572                Self::ENCODED_LEN,
12573                __tmp.remaining(),
12574            )
12575        }
12576        __tmp.put_u32_le(self.breach_time);
12577        __tmp.put_u16_le(self.breach_count);
12578        __tmp.put_u8(self.breach_status);
12579        __tmp.put_u8(self.breach_type as u8);
12580        if matches!(version, MavlinkVersion::V2) {
12581            __tmp.put_u8(self.breach_mitigation as u8);
12582            let len = __tmp.len();
12583            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12584        } else {
12585            __tmp.len()
12586        }
12587    }
12588}
12589#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
12590#[doc = ""]
12591#[doc = "ID: 110"]
12592#[derive(Debug, Clone, PartialEq)]
12593#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12594#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12595#[cfg_attr(feature = "ts", derive(TS))]
12596#[cfg_attr(feature = "ts", ts(export))]
12597pub struct FILE_TRANSFER_PROTOCOL_DATA {
12598    #[doc = "Network ID (0 for broadcast)"]
12599    pub target_network: u8,
12600    #[doc = "System ID (0 for broadcast)"]
12601    pub target_system: u8,
12602    #[doc = "Component ID (0 for broadcast)"]
12603    pub target_component: u8,
12604    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
12605    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12606    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12607    pub payload: [u8; 251],
12608}
12609impl FILE_TRANSFER_PROTOCOL_DATA {
12610    pub const ENCODED_LEN: usize = 254usize;
12611    pub const DEFAULT: Self = Self {
12612        target_network: 0_u8,
12613        target_system: 0_u8,
12614        target_component: 0_u8,
12615        payload: [0_u8; 251usize],
12616    };
12617    #[cfg(feature = "arbitrary")]
12618    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12619        use arbitrary::{Arbitrary, Unstructured};
12620        let mut buf = [0u8; 1024];
12621        rng.fill_bytes(&mut buf);
12622        let mut unstructured = Unstructured::new(&buf);
12623        Self::arbitrary(&mut unstructured).unwrap_or_default()
12624    }
12625}
12626impl Default for FILE_TRANSFER_PROTOCOL_DATA {
12627    fn default() -> Self {
12628        Self::DEFAULT.clone()
12629    }
12630}
12631impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
12632    type Message = MavMessage;
12633    const ID: u32 = 110u32;
12634    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
12635    const EXTRA_CRC: u8 = 84u8;
12636    const ENCODED_LEN: usize = 254usize;
12637    fn deser(
12638        _version: MavlinkVersion,
12639        __input: &[u8],
12640    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12641        let avail_len = __input.len();
12642        let mut payload_buf = [0; Self::ENCODED_LEN];
12643        let mut buf = if avail_len < Self::ENCODED_LEN {
12644            payload_buf[0..avail_len].copy_from_slice(__input);
12645            Bytes::new(&payload_buf)
12646        } else {
12647            Bytes::new(__input)
12648        };
12649        let mut __struct = Self::default();
12650        __struct.target_network = buf.get_u8();
12651        __struct.target_system = buf.get_u8();
12652        __struct.target_component = buf.get_u8();
12653        for v in &mut __struct.payload {
12654            let val = buf.get_u8();
12655            *v = val;
12656        }
12657        Ok(__struct)
12658    }
12659    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12660        let mut __tmp = BytesMut::new(bytes);
12661        #[allow(clippy::absurd_extreme_comparisons)]
12662        #[allow(unused_comparisons)]
12663        if __tmp.remaining() < Self::ENCODED_LEN {
12664            panic!(
12665                "buffer is too small (need {} bytes, but got {})",
12666                Self::ENCODED_LEN,
12667                __tmp.remaining(),
12668            )
12669        }
12670        __tmp.put_u8(self.target_network);
12671        __tmp.put_u8(self.target_system);
12672        __tmp.put_u8(self.target_component);
12673        for val in &self.payload {
12674            __tmp.put_u8(*val);
12675        }
12676        if matches!(version, MavlinkVersion::V2) {
12677            let len = __tmp.len();
12678            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12679        } else {
12680            __tmp.len()
12681        }
12682    }
12683}
12684#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
12685#[doc = ""]
12686#[doc = "ID: 264"]
12687#[derive(Debug, Clone, PartialEq)]
12688#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12689#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12690#[cfg_attr(feature = "ts", derive(TS))]
12691#[cfg_attr(feature = "ts", ts(export))]
12692pub struct FLIGHT_INFORMATION_DATA {
12693    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
12694    pub arming_time_utc: u64,
12695    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
12696    pub takeoff_time_utc: u64,
12697    #[doc = "Flight number. Note, field is misnamed UUID."]
12698    pub flight_uuid: u64,
12699    #[doc = "Timestamp (time since system boot)."]
12700    pub time_boot_ms: u32,
12701    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
12702    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12703    pub landing_time: u32,
12704}
12705impl FLIGHT_INFORMATION_DATA {
12706    pub const ENCODED_LEN: usize = 32usize;
12707    pub const DEFAULT: Self = Self {
12708        arming_time_utc: 0_u64,
12709        takeoff_time_utc: 0_u64,
12710        flight_uuid: 0_u64,
12711        time_boot_ms: 0_u32,
12712        landing_time: 0_u32,
12713    };
12714    #[cfg(feature = "arbitrary")]
12715    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12716        use arbitrary::{Arbitrary, Unstructured};
12717        let mut buf = [0u8; 1024];
12718        rng.fill_bytes(&mut buf);
12719        let mut unstructured = Unstructured::new(&buf);
12720        Self::arbitrary(&mut unstructured).unwrap_or_default()
12721    }
12722}
12723impl Default for FLIGHT_INFORMATION_DATA {
12724    fn default() -> Self {
12725        Self::DEFAULT.clone()
12726    }
12727}
12728impl MessageData for FLIGHT_INFORMATION_DATA {
12729    type Message = MavMessage;
12730    const ID: u32 = 264u32;
12731    const NAME: &'static str = "FLIGHT_INFORMATION";
12732    const EXTRA_CRC: u8 = 49u8;
12733    const ENCODED_LEN: usize = 32usize;
12734    fn deser(
12735        _version: MavlinkVersion,
12736        __input: &[u8],
12737    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12738        let avail_len = __input.len();
12739        let mut payload_buf = [0; Self::ENCODED_LEN];
12740        let mut buf = if avail_len < Self::ENCODED_LEN {
12741            payload_buf[0..avail_len].copy_from_slice(__input);
12742            Bytes::new(&payload_buf)
12743        } else {
12744            Bytes::new(__input)
12745        };
12746        let mut __struct = Self::default();
12747        __struct.arming_time_utc = buf.get_u64_le();
12748        __struct.takeoff_time_utc = buf.get_u64_le();
12749        __struct.flight_uuid = buf.get_u64_le();
12750        __struct.time_boot_ms = buf.get_u32_le();
12751        __struct.landing_time = buf.get_u32_le();
12752        Ok(__struct)
12753    }
12754    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12755        let mut __tmp = BytesMut::new(bytes);
12756        #[allow(clippy::absurd_extreme_comparisons)]
12757        #[allow(unused_comparisons)]
12758        if __tmp.remaining() < Self::ENCODED_LEN {
12759            panic!(
12760                "buffer is too small (need {} bytes, but got {})",
12761                Self::ENCODED_LEN,
12762                __tmp.remaining(),
12763            )
12764        }
12765        __tmp.put_u64_le(self.arming_time_utc);
12766        __tmp.put_u64_le(self.takeoff_time_utc);
12767        __tmp.put_u64_le(self.flight_uuid);
12768        __tmp.put_u32_le(self.time_boot_ms);
12769        if matches!(version, MavlinkVersion::V2) {
12770            __tmp.put_u32_le(self.landing_time);
12771            let len = __tmp.len();
12772            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12773        } else {
12774            __tmp.len()
12775        }
12776    }
12777}
12778#[doc = "Current motion information from a designated system."]
12779#[doc = ""]
12780#[doc = "ID: 144"]
12781#[derive(Debug, Clone, PartialEq)]
12782#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12783#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12784#[cfg_attr(feature = "ts", derive(TS))]
12785#[cfg_attr(feature = "ts", ts(export))]
12786pub struct FOLLOW_TARGET_DATA {
12787    #[doc = "Timestamp (time since system boot)."]
12788    pub timestamp: u64,
12789    #[doc = "button states or switches of a tracker device"]
12790    pub custom_state: u64,
12791    #[doc = "Latitude (WGS84)"]
12792    pub lat: i32,
12793    #[doc = "Longitude (WGS84)"]
12794    pub lon: i32,
12795    #[doc = "Altitude (MSL)"]
12796    pub alt: f32,
12797    #[doc = "target velocity (0,0,0) for unknown"]
12798    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12799    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12800    pub vel: [f32; 3],
12801    #[doc = "linear target acceleration (0,0,0) for unknown"]
12802    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12803    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12804    pub acc: [f32; 3],
12805    #[doc = "(0 0 0 0 for unknown)"]
12806    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12807    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12808    pub attitude_q: [f32; 4],
12809    #[doc = "(0 0 0 for unknown)"]
12810    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12811    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12812    pub rates: [f32; 3],
12813    #[doc = "eph epv"]
12814    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12815    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12816    pub position_cov: [f32; 3],
12817    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12818    pub est_capabilities: u8,
12819}
12820impl FOLLOW_TARGET_DATA {
12821    pub const ENCODED_LEN: usize = 93usize;
12822    pub const DEFAULT: Self = Self {
12823        timestamp: 0_u64,
12824        custom_state: 0_u64,
12825        lat: 0_i32,
12826        lon: 0_i32,
12827        alt: 0.0_f32,
12828        vel: [0.0_f32; 3usize],
12829        acc: [0.0_f32; 3usize],
12830        attitude_q: [0.0_f32; 4usize],
12831        rates: [0.0_f32; 3usize],
12832        position_cov: [0.0_f32; 3usize],
12833        est_capabilities: 0_u8,
12834    };
12835    #[cfg(feature = "arbitrary")]
12836    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12837        use arbitrary::{Arbitrary, Unstructured};
12838        let mut buf = [0u8; 1024];
12839        rng.fill_bytes(&mut buf);
12840        let mut unstructured = Unstructured::new(&buf);
12841        Self::arbitrary(&mut unstructured).unwrap_or_default()
12842    }
12843}
12844impl Default for FOLLOW_TARGET_DATA {
12845    fn default() -> Self {
12846        Self::DEFAULT.clone()
12847    }
12848}
12849impl MessageData for FOLLOW_TARGET_DATA {
12850    type Message = MavMessage;
12851    const ID: u32 = 144u32;
12852    const NAME: &'static str = "FOLLOW_TARGET";
12853    const EXTRA_CRC: u8 = 127u8;
12854    const ENCODED_LEN: usize = 93usize;
12855    fn deser(
12856        _version: MavlinkVersion,
12857        __input: &[u8],
12858    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12859        let avail_len = __input.len();
12860        let mut payload_buf = [0; Self::ENCODED_LEN];
12861        let mut buf = if avail_len < Self::ENCODED_LEN {
12862            payload_buf[0..avail_len].copy_from_slice(__input);
12863            Bytes::new(&payload_buf)
12864        } else {
12865            Bytes::new(__input)
12866        };
12867        let mut __struct = Self::default();
12868        __struct.timestamp = buf.get_u64_le();
12869        __struct.custom_state = buf.get_u64_le();
12870        __struct.lat = buf.get_i32_le();
12871        __struct.lon = buf.get_i32_le();
12872        __struct.alt = buf.get_f32_le();
12873        for v in &mut __struct.vel {
12874            let val = buf.get_f32_le();
12875            *v = val;
12876        }
12877        for v in &mut __struct.acc {
12878            let val = buf.get_f32_le();
12879            *v = val;
12880        }
12881        for v in &mut __struct.attitude_q {
12882            let val = buf.get_f32_le();
12883            *v = val;
12884        }
12885        for v in &mut __struct.rates {
12886            let val = buf.get_f32_le();
12887            *v = val;
12888        }
12889        for v in &mut __struct.position_cov {
12890            let val = buf.get_f32_le();
12891            *v = val;
12892        }
12893        __struct.est_capabilities = buf.get_u8();
12894        Ok(__struct)
12895    }
12896    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12897        let mut __tmp = BytesMut::new(bytes);
12898        #[allow(clippy::absurd_extreme_comparisons)]
12899        #[allow(unused_comparisons)]
12900        if __tmp.remaining() < Self::ENCODED_LEN {
12901            panic!(
12902                "buffer is too small (need {} bytes, but got {})",
12903                Self::ENCODED_LEN,
12904                __tmp.remaining(),
12905            )
12906        }
12907        __tmp.put_u64_le(self.timestamp);
12908        __tmp.put_u64_le(self.custom_state);
12909        __tmp.put_i32_le(self.lat);
12910        __tmp.put_i32_le(self.lon);
12911        __tmp.put_f32_le(self.alt);
12912        for val in &self.vel {
12913            __tmp.put_f32_le(*val);
12914        }
12915        for val in &self.acc {
12916            __tmp.put_f32_le(*val);
12917        }
12918        for val in &self.attitude_q {
12919            __tmp.put_f32_le(*val);
12920        }
12921        for val in &self.rates {
12922            __tmp.put_f32_le(*val);
12923        }
12924        for val in &self.position_cov {
12925            __tmp.put_f32_le(*val);
12926        }
12927        __tmp.put_u8(self.est_capabilities);
12928        if matches!(version, MavlinkVersion::V2) {
12929            let len = __tmp.len();
12930            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12931        } else {
12932            __tmp.len()
12933        }
12934    }
12935}
12936#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12937#[doc = ""]
12938#[doc = "ID: 371"]
12939#[derive(Debug, Clone, PartialEq)]
12940#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12941#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12942#[cfg_attr(feature = "ts", derive(TS))]
12943#[cfg_attr(feature = "ts", ts(export))]
12944pub struct FUEL_STATUS_DATA {
12945    #[doc = "Capacity when full. Must be provided."]
12946    pub maximum_fuel: f32,
12947    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12948    pub consumed_fuel: f32,
12949    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12950    pub remaining_fuel: f32,
12951    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12952    pub flow_rate: f32,
12953    #[doc = "Fuel temperature. NaN: field not provided."]
12954    pub temperature: f32,
12955    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12956    pub fuel_type: MavFuelType,
12957    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12958    pub id: u8,
12959    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12960    pub percent_remaining: u8,
12961}
12962impl FUEL_STATUS_DATA {
12963    pub const ENCODED_LEN: usize = 26usize;
12964    pub const DEFAULT: Self = Self {
12965        maximum_fuel: 0.0_f32,
12966        consumed_fuel: 0.0_f32,
12967        remaining_fuel: 0.0_f32,
12968        flow_rate: 0.0_f32,
12969        temperature: 0.0_f32,
12970        fuel_type: MavFuelType::DEFAULT,
12971        id: 0_u8,
12972        percent_remaining: 0_u8,
12973    };
12974    #[cfg(feature = "arbitrary")]
12975    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12976        use arbitrary::{Arbitrary, Unstructured};
12977        let mut buf = [0u8; 1024];
12978        rng.fill_bytes(&mut buf);
12979        let mut unstructured = Unstructured::new(&buf);
12980        Self::arbitrary(&mut unstructured).unwrap_or_default()
12981    }
12982}
12983impl Default for FUEL_STATUS_DATA {
12984    fn default() -> Self {
12985        Self::DEFAULT.clone()
12986    }
12987}
12988impl MessageData for FUEL_STATUS_DATA {
12989    type Message = MavMessage;
12990    const ID: u32 = 371u32;
12991    const NAME: &'static str = "FUEL_STATUS";
12992    const EXTRA_CRC: u8 = 10u8;
12993    const ENCODED_LEN: usize = 26usize;
12994    fn deser(
12995        _version: MavlinkVersion,
12996        __input: &[u8],
12997    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12998        let avail_len = __input.len();
12999        let mut payload_buf = [0; Self::ENCODED_LEN];
13000        let mut buf = if avail_len < Self::ENCODED_LEN {
13001            payload_buf[0..avail_len].copy_from_slice(__input);
13002            Bytes::new(&payload_buf)
13003        } else {
13004            Bytes::new(__input)
13005        };
13006        let mut __struct = Self::default();
13007        __struct.maximum_fuel = buf.get_f32_le();
13008        __struct.consumed_fuel = buf.get_f32_le();
13009        __struct.remaining_fuel = buf.get_f32_le();
13010        __struct.flow_rate = buf.get_f32_le();
13011        __struct.temperature = buf.get_f32_le();
13012        let tmp = buf.get_u32_le();
13013        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
13014            ::mavlink_core::error::ParserError::InvalidEnum {
13015                enum_type: "MavFuelType",
13016                value: tmp as u64,
13017            },
13018        )?;
13019        __struct.id = buf.get_u8();
13020        __struct.percent_remaining = buf.get_u8();
13021        Ok(__struct)
13022    }
13023    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13024        let mut __tmp = BytesMut::new(bytes);
13025        #[allow(clippy::absurd_extreme_comparisons)]
13026        #[allow(unused_comparisons)]
13027        if __tmp.remaining() < Self::ENCODED_LEN {
13028            panic!(
13029                "buffer is too small (need {} bytes, but got {})",
13030                Self::ENCODED_LEN,
13031                __tmp.remaining(),
13032            )
13033        }
13034        __tmp.put_f32_le(self.maximum_fuel);
13035        __tmp.put_f32_le(self.consumed_fuel);
13036        __tmp.put_f32_le(self.remaining_fuel);
13037        __tmp.put_f32_le(self.flow_rate);
13038        __tmp.put_f32_le(self.temperature);
13039        __tmp.put_u32_le(self.fuel_type as u32);
13040        __tmp.put_u8(self.id);
13041        __tmp.put_u8(self.percent_remaining);
13042        if matches!(version, MavlinkVersion::V2) {
13043            let len = __tmp.len();
13044            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13045        } else {
13046            __tmp.len()
13047        }
13048    }
13049}
13050#[doc = "Fixed-wing soaring (i.e. thermal seeking) data."]
13051#[doc = ""]
13052#[doc = "ID: 8011"]
13053#[derive(Debug, Clone, PartialEq)]
13054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13055#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13056#[cfg_attr(feature = "ts", derive(TS))]
13057#[cfg_attr(feature = "ts", ts(export))]
13058pub struct FW_SOARING_DATA_DATA {
13059    #[doc = "Timestamp"]
13060    pub timestamp: u64,
13061    #[doc = "Timestamp since last mode change"]
13062    pub timestampModeChanged: u64,
13063    #[doc = "Thermal core updraft strength"]
13064    pub xW: f32,
13065    #[doc = "Thermal radius"]
13066    pub xR: f32,
13067    #[doc = "Thermal center latitude"]
13068    pub xLat: f32,
13069    #[doc = "Thermal center longitude"]
13070    pub xLon: f32,
13071    #[doc = "Variance W"]
13072    pub VarW: f32,
13073    #[doc = "Variance R"]
13074    pub VarR: f32,
13075    #[doc = "Variance Lat"]
13076    pub VarLat: f32,
13077    #[doc = "Variance Lon"]
13078    pub VarLon: f32,
13079    #[doc = "Suggested loiter radius"]
13080    pub LoiterRadius: f32,
13081    #[doc = "Suggested loiter direction"]
13082    pub LoiterDirection: f32,
13083    #[doc = "Distance to soar point"]
13084    pub DistToSoarPoint: f32,
13085    #[doc = "Expected sink rate at current airspeed, roll and throttle"]
13086    pub vSinkExp: f32,
13087    #[doc = "Measurement / updraft speed at current/local airplane position"]
13088    pub z1_LocalUpdraftSpeed: f32,
13089    #[doc = "Measurement / roll angle tracking error"]
13090    pub z2_DeltaRoll: f32,
13091    #[doc = "Expected measurement 1"]
13092    pub z1_exp: f32,
13093    #[doc = "Expected measurement 2"]
13094    pub z2_exp: f32,
13095    #[doc = "Thermal drift (from estimator prediction step only)"]
13096    pub ThermalGSNorth: f32,
13097    #[doc = "Thermal drift (from estimator prediction step only)"]
13098    pub ThermalGSEast: f32,
13099    #[doc = "Total specific energy change (filtered)"]
13100    pub TSE_dot: f32,
13101    #[doc = "Debug variable 1"]
13102    pub DebugVar1: f32,
13103    #[doc = "Debug variable 2"]
13104    pub DebugVar2: f32,
13105    #[doc = "Control Mode [-]"]
13106    pub ControlMode: u8,
13107    #[doc = "Data valid [-]"]
13108    pub valid: u8,
13109}
13110impl FW_SOARING_DATA_DATA {
13111    pub const ENCODED_LEN: usize = 102usize;
13112    pub const DEFAULT: Self = Self {
13113        timestamp: 0_u64,
13114        timestampModeChanged: 0_u64,
13115        xW: 0.0_f32,
13116        xR: 0.0_f32,
13117        xLat: 0.0_f32,
13118        xLon: 0.0_f32,
13119        VarW: 0.0_f32,
13120        VarR: 0.0_f32,
13121        VarLat: 0.0_f32,
13122        VarLon: 0.0_f32,
13123        LoiterRadius: 0.0_f32,
13124        LoiterDirection: 0.0_f32,
13125        DistToSoarPoint: 0.0_f32,
13126        vSinkExp: 0.0_f32,
13127        z1_LocalUpdraftSpeed: 0.0_f32,
13128        z2_DeltaRoll: 0.0_f32,
13129        z1_exp: 0.0_f32,
13130        z2_exp: 0.0_f32,
13131        ThermalGSNorth: 0.0_f32,
13132        ThermalGSEast: 0.0_f32,
13133        TSE_dot: 0.0_f32,
13134        DebugVar1: 0.0_f32,
13135        DebugVar2: 0.0_f32,
13136        ControlMode: 0_u8,
13137        valid: 0_u8,
13138    };
13139    #[cfg(feature = "arbitrary")]
13140    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13141        use arbitrary::{Arbitrary, Unstructured};
13142        let mut buf = [0u8; 1024];
13143        rng.fill_bytes(&mut buf);
13144        let mut unstructured = Unstructured::new(&buf);
13145        Self::arbitrary(&mut unstructured).unwrap_or_default()
13146    }
13147}
13148impl Default for FW_SOARING_DATA_DATA {
13149    fn default() -> Self {
13150        Self::DEFAULT.clone()
13151    }
13152}
13153impl MessageData for FW_SOARING_DATA_DATA {
13154    type Message = MavMessage;
13155    const ID: u32 = 8011u32;
13156    const NAME: &'static str = "FW_SOARING_DATA";
13157    const EXTRA_CRC: u8 = 20u8;
13158    const ENCODED_LEN: usize = 102usize;
13159    fn deser(
13160        _version: MavlinkVersion,
13161        __input: &[u8],
13162    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13163        let avail_len = __input.len();
13164        let mut payload_buf = [0; Self::ENCODED_LEN];
13165        let mut buf = if avail_len < Self::ENCODED_LEN {
13166            payload_buf[0..avail_len].copy_from_slice(__input);
13167            Bytes::new(&payload_buf)
13168        } else {
13169            Bytes::new(__input)
13170        };
13171        let mut __struct = Self::default();
13172        __struct.timestamp = buf.get_u64_le();
13173        __struct.timestampModeChanged = buf.get_u64_le();
13174        __struct.xW = buf.get_f32_le();
13175        __struct.xR = buf.get_f32_le();
13176        __struct.xLat = buf.get_f32_le();
13177        __struct.xLon = buf.get_f32_le();
13178        __struct.VarW = buf.get_f32_le();
13179        __struct.VarR = buf.get_f32_le();
13180        __struct.VarLat = buf.get_f32_le();
13181        __struct.VarLon = buf.get_f32_le();
13182        __struct.LoiterRadius = buf.get_f32_le();
13183        __struct.LoiterDirection = buf.get_f32_le();
13184        __struct.DistToSoarPoint = buf.get_f32_le();
13185        __struct.vSinkExp = buf.get_f32_le();
13186        __struct.z1_LocalUpdraftSpeed = buf.get_f32_le();
13187        __struct.z2_DeltaRoll = buf.get_f32_le();
13188        __struct.z1_exp = buf.get_f32_le();
13189        __struct.z2_exp = buf.get_f32_le();
13190        __struct.ThermalGSNorth = buf.get_f32_le();
13191        __struct.ThermalGSEast = buf.get_f32_le();
13192        __struct.TSE_dot = buf.get_f32_le();
13193        __struct.DebugVar1 = buf.get_f32_le();
13194        __struct.DebugVar2 = buf.get_f32_le();
13195        __struct.ControlMode = buf.get_u8();
13196        __struct.valid = buf.get_u8();
13197        Ok(__struct)
13198    }
13199    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13200        let mut __tmp = BytesMut::new(bytes);
13201        #[allow(clippy::absurd_extreme_comparisons)]
13202        #[allow(unused_comparisons)]
13203        if __tmp.remaining() < Self::ENCODED_LEN {
13204            panic!(
13205                "buffer is too small (need {} bytes, but got {})",
13206                Self::ENCODED_LEN,
13207                __tmp.remaining(),
13208            )
13209        }
13210        __tmp.put_u64_le(self.timestamp);
13211        __tmp.put_u64_le(self.timestampModeChanged);
13212        __tmp.put_f32_le(self.xW);
13213        __tmp.put_f32_le(self.xR);
13214        __tmp.put_f32_le(self.xLat);
13215        __tmp.put_f32_le(self.xLon);
13216        __tmp.put_f32_le(self.VarW);
13217        __tmp.put_f32_le(self.VarR);
13218        __tmp.put_f32_le(self.VarLat);
13219        __tmp.put_f32_le(self.VarLon);
13220        __tmp.put_f32_le(self.LoiterRadius);
13221        __tmp.put_f32_le(self.LoiterDirection);
13222        __tmp.put_f32_le(self.DistToSoarPoint);
13223        __tmp.put_f32_le(self.vSinkExp);
13224        __tmp.put_f32_le(self.z1_LocalUpdraftSpeed);
13225        __tmp.put_f32_le(self.z2_DeltaRoll);
13226        __tmp.put_f32_le(self.z1_exp);
13227        __tmp.put_f32_le(self.z2_exp);
13228        __tmp.put_f32_le(self.ThermalGSNorth);
13229        __tmp.put_f32_le(self.ThermalGSEast);
13230        __tmp.put_f32_le(self.TSE_dot);
13231        __tmp.put_f32_le(self.DebugVar1);
13232        __tmp.put_f32_le(self.DebugVar2);
13233        __tmp.put_u8(self.ControlMode);
13234        __tmp.put_u8(self.valid);
13235        if matches!(version, MavlinkVersion::V2) {
13236            let len = __tmp.len();
13237            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13238        } else {
13239            __tmp.len()
13240        }
13241    }
13242}
13243#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
13244#[doc = ""]
13245#[doc = "ID: 373"]
13246#[derive(Debug, Clone, PartialEq)]
13247#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13248#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13249#[cfg_attr(feature = "ts", derive(TS))]
13250#[cfg_attr(feature = "ts", ts(export))]
13251pub struct GENERATOR_STATUS_DATA {
13252    #[doc = "Status flags."]
13253    pub status: MavGeneratorStatusFlag,
13254    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
13255    pub battery_current: f32,
13256    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
13257    pub load_current: f32,
13258    #[doc = "The power being generated. NaN: field not provided"]
13259    pub power_generated: f32,
13260    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
13261    pub bus_voltage: f32,
13262    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
13263    pub bat_current_setpoint: f32,
13264    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
13265    pub runtime: u32,
13266    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
13267    pub time_until_maintenance: i32,
13268    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
13269    pub generator_speed: u16,
13270    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
13271    pub rectifier_temperature: i16,
13272    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
13273    pub generator_temperature: i16,
13274}
13275impl GENERATOR_STATUS_DATA {
13276    pub const ENCODED_LEN: usize = 42usize;
13277    pub const DEFAULT: Self = Self {
13278        status: MavGeneratorStatusFlag::DEFAULT,
13279        battery_current: 0.0_f32,
13280        load_current: 0.0_f32,
13281        power_generated: 0.0_f32,
13282        bus_voltage: 0.0_f32,
13283        bat_current_setpoint: 0.0_f32,
13284        runtime: 0_u32,
13285        time_until_maintenance: 0_i32,
13286        generator_speed: 0_u16,
13287        rectifier_temperature: 0_i16,
13288        generator_temperature: 0_i16,
13289    };
13290    #[cfg(feature = "arbitrary")]
13291    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13292        use arbitrary::{Arbitrary, Unstructured};
13293        let mut buf = [0u8; 1024];
13294        rng.fill_bytes(&mut buf);
13295        let mut unstructured = Unstructured::new(&buf);
13296        Self::arbitrary(&mut unstructured).unwrap_or_default()
13297    }
13298}
13299impl Default for GENERATOR_STATUS_DATA {
13300    fn default() -> Self {
13301        Self::DEFAULT.clone()
13302    }
13303}
13304impl MessageData for GENERATOR_STATUS_DATA {
13305    type Message = MavMessage;
13306    const ID: u32 = 373u32;
13307    const NAME: &'static str = "GENERATOR_STATUS";
13308    const EXTRA_CRC: u8 = 117u8;
13309    const ENCODED_LEN: usize = 42usize;
13310    fn deser(
13311        _version: MavlinkVersion,
13312        __input: &[u8],
13313    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13314        let avail_len = __input.len();
13315        let mut payload_buf = [0; Self::ENCODED_LEN];
13316        let mut buf = if avail_len < Self::ENCODED_LEN {
13317            payload_buf[0..avail_len].copy_from_slice(__input);
13318            Bytes::new(&payload_buf)
13319        } else {
13320            Bytes::new(__input)
13321        };
13322        let mut __struct = Self::default();
13323        let tmp = buf.get_u64_le();
13324        __struct.status =
13325            MavGeneratorStatusFlag::from_bits(tmp as <MavGeneratorStatusFlag as Flags>::Bits)
13326                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13327                    flag_type: "MavGeneratorStatusFlag",
13328                    value: tmp as u64,
13329                })?;
13330        __struct.battery_current = buf.get_f32_le();
13331        __struct.load_current = buf.get_f32_le();
13332        __struct.power_generated = buf.get_f32_le();
13333        __struct.bus_voltage = buf.get_f32_le();
13334        __struct.bat_current_setpoint = buf.get_f32_le();
13335        __struct.runtime = buf.get_u32_le();
13336        __struct.time_until_maintenance = buf.get_i32_le();
13337        __struct.generator_speed = buf.get_u16_le();
13338        __struct.rectifier_temperature = buf.get_i16_le();
13339        __struct.generator_temperature = buf.get_i16_le();
13340        Ok(__struct)
13341    }
13342    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13343        let mut __tmp = BytesMut::new(bytes);
13344        #[allow(clippy::absurd_extreme_comparisons)]
13345        #[allow(unused_comparisons)]
13346        if __tmp.remaining() < Self::ENCODED_LEN {
13347            panic!(
13348                "buffer is too small (need {} bytes, but got {})",
13349                Self::ENCODED_LEN,
13350                __tmp.remaining(),
13351            )
13352        }
13353        __tmp.put_u64_le(self.status.bits() as u64);
13354        __tmp.put_f32_le(self.battery_current);
13355        __tmp.put_f32_le(self.load_current);
13356        __tmp.put_f32_le(self.power_generated);
13357        __tmp.put_f32_le(self.bus_voltage);
13358        __tmp.put_f32_le(self.bat_current_setpoint);
13359        __tmp.put_u32_le(self.runtime);
13360        __tmp.put_i32_le(self.time_until_maintenance);
13361        __tmp.put_u16_le(self.generator_speed);
13362        __tmp.put_i16_le(self.rectifier_temperature);
13363        __tmp.put_i16_le(self.generator_temperature);
13364        if matches!(version, MavlinkVersion::V2) {
13365            let len = __tmp.len();
13366            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13367        } else {
13368            __tmp.len()
13369        }
13370    }
13371}
13372#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
13373#[doc = ""]
13374#[doc = "ID: 285"]
13375#[derive(Debug, Clone, PartialEq)]
13376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13378#[cfg_attr(feature = "ts", derive(TS))]
13379#[cfg_attr(feature = "ts", ts(export))]
13380pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13381    #[doc = "Timestamp (time since system boot)."]
13382    pub time_boot_ms: u32,
13383    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
13384    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13385    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13386    pub q: [f32; 4],
13387    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
13388    pub angular_velocity_x: f32,
13389    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
13390    pub angular_velocity_y: f32,
13391    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
13392    pub angular_velocity_z: f32,
13393    #[doc = "Failure flags (0 for no failure)"]
13394    pub failure_flags: GimbalDeviceErrorFlags,
13395    #[doc = "Current gimbal flags set."]
13396    pub flags: GimbalDeviceFlags,
13397    #[doc = "System ID"]
13398    pub target_system: u8,
13399    #[doc = "Component ID"]
13400    pub target_component: u8,
13401    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
13402    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13403    pub delta_yaw: f32,
13404    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
13405    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13406    pub delta_yaw_velocity: f32,
13407    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
13408    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13409    pub gimbal_device_id: u8,
13410}
13411impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13412    pub const ENCODED_LEN: usize = 49usize;
13413    pub const DEFAULT: Self = Self {
13414        time_boot_ms: 0_u32,
13415        q: [0.0_f32; 4usize],
13416        angular_velocity_x: 0.0_f32,
13417        angular_velocity_y: 0.0_f32,
13418        angular_velocity_z: 0.0_f32,
13419        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
13420        flags: GimbalDeviceFlags::DEFAULT,
13421        target_system: 0_u8,
13422        target_component: 0_u8,
13423        delta_yaw: 0.0_f32,
13424        delta_yaw_velocity: 0.0_f32,
13425        gimbal_device_id: 0_u8,
13426    };
13427    #[cfg(feature = "arbitrary")]
13428    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13429        use arbitrary::{Arbitrary, Unstructured};
13430        let mut buf = [0u8; 1024];
13431        rng.fill_bytes(&mut buf);
13432        let mut unstructured = Unstructured::new(&buf);
13433        Self::arbitrary(&mut unstructured).unwrap_or_default()
13434    }
13435}
13436impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13437    fn default() -> Self {
13438        Self::DEFAULT.clone()
13439    }
13440}
13441impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13442    type Message = MavMessage;
13443    const ID: u32 = 285u32;
13444    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
13445    const EXTRA_CRC: u8 = 137u8;
13446    const ENCODED_LEN: usize = 49usize;
13447    fn deser(
13448        _version: MavlinkVersion,
13449        __input: &[u8],
13450    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13451        let avail_len = __input.len();
13452        let mut payload_buf = [0; Self::ENCODED_LEN];
13453        let mut buf = if avail_len < Self::ENCODED_LEN {
13454            payload_buf[0..avail_len].copy_from_slice(__input);
13455            Bytes::new(&payload_buf)
13456        } else {
13457            Bytes::new(__input)
13458        };
13459        let mut __struct = Self::default();
13460        __struct.time_boot_ms = buf.get_u32_le();
13461        for v in &mut __struct.q {
13462            let val = buf.get_f32_le();
13463            *v = val;
13464        }
13465        __struct.angular_velocity_x = buf.get_f32_le();
13466        __struct.angular_velocity_y = buf.get_f32_le();
13467        __struct.angular_velocity_z = buf.get_f32_le();
13468        let tmp = buf.get_u32_le();
13469        __struct.failure_flags =
13470            GimbalDeviceErrorFlags::from_bits(tmp as <GimbalDeviceErrorFlags as Flags>::Bits)
13471                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13472                    flag_type: "GimbalDeviceErrorFlags",
13473                    value: tmp as u64,
13474                })?;
13475        let tmp = buf.get_u16_le();
13476        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
13477            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13478                flag_type: "GimbalDeviceFlags",
13479                value: tmp as u64,
13480            })?;
13481        __struct.target_system = buf.get_u8();
13482        __struct.target_component = buf.get_u8();
13483        __struct.delta_yaw = buf.get_f32_le();
13484        __struct.delta_yaw_velocity = buf.get_f32_le();
13485        __struct.gimbal_device_id = buf.get_u8();
13486        Ok(__struct)
13487    }
13488    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13489        let mut __tmp = BytesMut::new(bytes);
13490        #[allow(clippy::absurd_extreme_comparisons)]
13491        #[allow(unused_comparisons)]
13492        if __tmp.remaining() < Self::ENCODED_LEN {
13493            panic!(
13494                "buffer is too small (need {} bytes, but got {})",
13495                Self::ENCODED_LEN,
13496                __tmp.remaining(),
13497            )
13498        }
13499        __tmp.put_u32_le(self.time_boot_ms);
13500        for val in &self.q {
13501            __tmp.put_f32_le(*val);
13502        }
13503        __tmp.put_f32_le(self.angular_velocity_x);
13504        __tmp.put_f32_le(self.angular_velocity_y);
13505        __tmp.put_f32_le(self.angular_velocity_z);
13506        __tmp.put_u32_le(self.failure_flags.bits() as u32);
13507        __tmp.put_u16_le(self.flags.bits() as u16);
13508        __tmp.put_u8(self.target_system);
13509        __tmp.put_u8(self.target_component);
13510        if matches!(version, MavlinkVersion::V2) {
13511            __tmp.put_f32_le(self.delta_yaw);
13512            __tmp.put_f32_le(self.delta_yaw_velocity);
13513            __tmp.put_u8(self.gimbal_device_id);
13514            let len = __tmp.len();
13515            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13516        } else {
13517            __tmp.len()
13518        }
13519    }
13520}
13521#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
13522#[doc = ""]
13523#[doc = "ID: 283"]
13524#[derive(Debug, Clone, PartialEq)]
13525#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13526#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13527#[cfg_attr(feature = "ts", derive(TS))]
13528#[cfg_attr(feature = "ts", ts(export))]
13529pub struct GIMBAL_DEVICE_INFORMATION_DATA {
13530    #[doc = "UID of gimbal hardware (0 if unknown)."]
13531    pub uid: u64,
13532    #[doc = "Timestamp (time since system boot)."]
13533    pub time_boot_ms: u32,
13534    #[doc = "0xff)."]
13535    pub firmware_version: u32,
13536    #[doc = "0xff)."]
13537    pub hardware_version: u32,
13538    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13539    pub roll_min: f32,
13540    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13541    pub roll_max: f32,
13542    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13543    pub pitch_min: f32,
13544    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13545    pub pitch_max: f32,
13546    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13547    pub yaw_min: f32,
13548    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13549    pub yaw_max: f32,
13550    #[doc = "Bitmap of gimbal capability flags."]
13551    pub cap_flags: GimbalDeviceCapFlags,
13552    #[doc = "Bitmap for use for gimbal-specific capability flags."]
13553    pub custom_cap_flags: u16,
13554    #[doc = "Name of the gimbal vendor."]
13555    #[cfg_attr(feature = "ts", ts(type = "string"))]
13556    pub vendor_name: CharArray<32>,
13557    #[doc = "Name of the gimbal model."]
13558    #[cfg_attr(feature = "ts", ts(type = "string"))]
13559    pub model_name: CharArray<32>,
13560    #[doc = "Custom name of the gimbal given to it by the user."]
13561    #[cfg_attr(feature = "ts", ts(type = "string"))]
13562    pub custom_name: CharArray<32>,
13563    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
13564    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13565    pub gimbal_device_id: u8,
13566}
13567impl GIMBAL_DEVICE_INFORMATION_DATA {
13568    pub const ENCODED_LEN: usize = 145usize;
13569    pub const DEFAULT: Self = Self {
13570        uid: 0_u64,
13571        time_boot_ms: 0_u32,
13572        firmware_version: 0_u32,
13573        hardware_version: 0_u32,
13574        roll_min: 0.0_f32,
13575        roll_max: 0.0_f32,
13576        pitch_min: 0.0_f32,
13577        pitch_max: 0.0_f32,
13578        yaw_min: 0.0_f32,
13579        yaw_max: 0.0_f32,
13580        cap_flags: GimbalDeviceCapFlags::DEFAULT,
13581        custom_cap_flags: 0_u16,
13582        vendor_name: CharArray::new([0_u8; 32usize]),
13583        model_name: CharArray::new([0_u8; 32usize]),
13584        custom_name: CharArray::new([0_u8; 32usize]),
13585        gimbal_device_id: 0_u8,
13586    };
13587    #[cfg(feature = "arbitrary")]
13588    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13589        use arbitrary::{Arbitrary, Unstructured};
13590        let mut buf = [0u8; 1024];
13591        rng.fill_bytes(&mut buf);
13592        let mut unstructured = Unstructured::new(&buf);
13593        Self::arbitrary(&mut unstructured).unwrap_or_default()
13594    }
13595}
13596impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
13597    fn default() -> Self {
13598        Self::DEFAULT.clone()
13599    }
13600}
13601impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
13602    type Message = MavMessage;
13603    const ID: u32 = 283u32;
13604    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
13605    const EXTRA_CRC: u8 = 74u8;
13606    const ENCODED_LEN: usize = 145usize;
13607    fn deser(
13608        _version: MavlinkVersion,
13609        __input: &[u8],
13610    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13611        let avail_len = __input.len();
13612        let mut payload_buf = [0; Self::ENCODED_LEN];
13613        let mut buf = if avail_len < Self::ENCODED_LEN {
13614            payload_buf[0..avail_len].copy_from_slice(__input);
13615            Bytes::new(&payload_buf)
13616        } else {
13617            Bytes::new(__input)
13618        };
13619        let mut __struct = Self::default();
13620        __struct.uid = buf.get_u64_le();
13621        __struct.time_boot_ms = buf.get_u32_le();
13622        __struct.firmware_version = buf.get_u32_le();
13623        __struct.hardware_version = buf.get_u32_le();
13624        __struct.roll_min = buf.get_f32_le();
13625        __struct.roll_max = buf.get_f32_le();
13626        __struct.pitch_min = buf.get_f32_le();
13627        __struct.pitch_max = buf.get_f32_le();
13628        __struct.yaw_min = buf.get_f32_le();
13629        __struct.yaw_max = buf.get_f32_le();
13630        let tmp = buf.get_u16_le();
13631        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
13632            tmp as <GimbalDeviceCapFlags as Flags>::Bits,
13633        )
13634        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13635            flag_type: "GimbalDeviceCapFlags",
13636            value: tmp as u64,
13637        })?;
13638        __struct.custom_cap_flags = buf.get_u16_le();
13639        let mut tmp = [0_u8; 32usize];
13640        for v in &mut tmp {
13641            *v = buf.get_u8();
13642        }
13643        __struct.vendor_name = CharArray::new(tmp);
13644        let mut tmp = [0_u8; 32usize];
13645        for v in &mut tmp {
13646            *v = buf.get_u8();
13647        }
13648        __struct.model_name = CharArray::new(tmp);
13649        let mut tmp = [0_u8; 32usize];
13650        for v in &mut tmp {
13651            *v = buf.get_u8();
13652        }
13653        __struct.custom_name = CharArray::new(tmp);
13654        __struct.gimbal_device_id = buf.get_u8();
13655        Ok(__struct)
13656    }
13657    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13658        let mut __tmp = BytesMut::new(bytes);
13659        #[allow(clippy::absurd_extreme_comparisons)]
13660        #[allow(unused_comparisons)]
13661        if __tmp.remaining() < Self::ENCODED_LEN {
13662            panic!(
13663                "buffer is too small (need {} bytes, but got {})",
13664                Self::ENCODED_LEN,
13665                __tmp.remaining(),
13666            )
13667        }
13668        __tmp.put_u64_le(self.uid);
13669        __tmp.put_u32_le(self.time_boot_ms);
13670        __tmp.put_u32_le(self.firmware_version);
13671        __tmp.put_u32_le(self.hardware_version);
13672        __tmp.put_f32_le(self.roll_min);
13673        __tmp.put_f32_le(self.roll_max);
13674        __tmp.put_f32_le(self.pitch_min);
13675        __tmp.put_f32_le(self.pitch_max);
13676        __tmp.put_f32_le(self.yaw_min);
13677        __tmp.put_f32_le(self.yaw_max);
13678        __tmp.put_u16_le(self.cap_flags.bits() as u16);
13679        __tmp.put_u16_le(self.custom_cap_flags);
13680        for val in &self.vendor_name {
13681            __tmp.put_u8(*val);
13682        }
13683        for val in &self.model_name {
13684            __tmp.put_u8(*val);
13685        }
13686        for val in &self.custom_name {
13687            __tmp.put_u8(*val);
13688        }
13689        if matches!(version, MavlinkVersion::V2) {
13690            __tmp.put_u8(self.gimbal_device_id);
13691            let len = __tmp.len();
13692            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13693        } else {
13694            __tmp.len()
13695        }
13696    }
13697}
13698#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
13699#[doc = ""]
13700#[doc = "ID: 284"]
13701#[derive(Debug, Clone, PartialEq)]
13702#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13704#[cfg_attr(feature = "ts", derive(TS))]
13705#[cfg_attr(feature = "ts", ts(export))]
13706pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13707    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
13708    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13709    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13710    pub q: [f32; 4],
13711    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
13712    pub angular_velocity_x: f32,
13713    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
13714    pub angular_velocity_y: f32,
13715    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
13716    pub angular_velocity_z: f32,
13717    #[doc = "Low level gimbal flags."]
13718    pub flags: GimbalDeviceFlags,
13719    #[doc = "System ID"]
13720    pub target_system: u8,
13721    #[doc = "Component ID"]
13722    pub target_component: u8,
13723}
13724impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13725    pub const ENCODED_LEN: usize = 32usize;
13726    pub const DEFAULT: Self = Self {
13727        q: [0.0_f32; 4usize],
13728        angular_velocity_x: 0.0_f32,
13729        angular_velocity_y: 0.0_f32,
13730        angular_velocity_z: 0.0_f32,
13731        flags: GimbalDeviceFlags::DEFAULT,
13732        target_system: 0_u8,
13733        target_component: 0_u8,
13734    };
13735    #[cfg(feature = "arbitrary")]
13736    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13737        use arbitrary::{Arbitrary, Unstructured};
13738        let mut buf = [0u8; 1024];
13739        rng.fill_bytes(&mut buf);
13740        let mut unstructured = Unstructured::new(&buf);
13741        Self::arbitrary(&mut unstructured).unwrap_or_default()
13742    }
13743}
13744impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13745    fn default() -> Self {
13746        Self::DEFAULT.clone()
13747    }
13748}
13749impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13750    type Message = MavMessage;
13751    const ID: u32 = 284u32;
13752    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
13753    const EXTRA_CRC: u8 = 99u8;
13754    const ENCODED_LEN: usize = 32usize;
13755    fn deser(
13756        _version: MavlinkVersion,
13757        __input: &[u8],
13758    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13759        let avail_len = __input.len();
13760        let mut payload_buf = [0; Self::ENCODED_LEN];
13761        let mut buf = if avail_len < Self::ENCODED_LEN {
13762            payload_buf[0..avail_len].copy_from_slice(__input);
13763            Bytes::new(&payload_buf)
13764        } else {
13765            Bytes::new(__input)
13766        };
13767        let mut __struct = Self::default();
13768        for v in &mut __struct.q {
13769            let val = buf.get_f32_le();
13770            *v = val;
13771        }
13772        __struct.angular_velocity_x = buf.get_f32_le();
13773        __struct.angular_velocity_y = buf.get_f32_le();
13774        __struct.angular_velocity_z = buf.get_f32_le();
13775        let tmp = buf.get_u16_le();
13776        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
13777            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13778                flag_type: "GimbalDeviceFlags",
13779                value: tmp as u64,
13780            })?;
13781        __struct.target_system = buf.get_u8();
13782        __struct.target_component = buf.get_u8();
13783        Ok(__struct)
13784    }
13785    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13786        let mut __tmp = BytesMut::new(bytes);
13787        #[allow(clippy::absurd_extreme_comparisons)]
13788        #[allow(unused_comparisons)]
13789        if __tmp.remaining() < Self::ENCODED_LEN {
13790            panic!(
13791                "buffer is too small (need {} bytes, but got {})",
13792                Self::ENCODED_LEN,
13793                __tmp.remaining(),
13794            )
13795        }
13796        for val in &self.q {
13797            __tmp.put_f32_le(*val);
13798        }
13799        __tmp.put_f32_le(self.angular_velocity_x);
13800        __tmp.put_f32_le(self.angular_velocity_y);
13801        __tmp.put_f32_le(self.angular_velocity_z);
13802        __tmp.put_u16_le(self.flags.bits() as u16);
13803        __tmp.put_u8(self.target_system);
13804        __tmp.put_u8(self.target_component);
13805        if matches!(version, MavlinkVersion::V2) {
13806            let len = __tmp.len();
13807            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13808        } else {
13809            __tmp.len()
13810        }
13811    }
13812}
13813#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13814#[doc = ""]
13815#[doc = "ID: 280"]
13816#[derive(Debug, Clone, PartialEq)]
13817#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13819#[cfg_attr(feature = "ts", derive(TS))]
13820#[cfg_attr(feature = "ts", ts(export))]
13821pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13822    #[doc = "Timestamp (time since system boot)."]
13823    pub time_boot_ms: u32,
13824    #[doc = "Bitmap of gimbal capability flags."]
13825    pub cap_flags: GimbalManagerCapFlags,
13826    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13827    pub roll_min: f32,
13828    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13829    pub roll_max: f32,
13830    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13831    pub pitch_min: f32,
13832    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13833    pub pitch_max: f32,
13834    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13835    pub yaw_min: f32,
13836    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13837    pub yaw_max: f32,
13838    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13839    pub gimbal_device_id: u8,
13840}
13841impl GIMBAL_MANAGER_INFORMATION_DATA {
13842    pub const ENCODED_LEN: usize = 33usize;
13843    pub const DEFAULT: Self = Self {
13844        time_boot_ms: 0_u32,
13845        cap_flags: GimbalManagerCapFlags::DEFAULT,
13846        roll_min: 0.0_f32,
13847        roll_max: 0.0_f32,
13848        pitch_min: 0.0_f32,
13849        pitch_max: 0.0_f32,
13850        yaw_min: 0.0_f32,
13851        yaw_max: 0.0_f32,
13852        gimbal_device_id: 0_u8,
13853    };
13854    #[cfg(feature = "arbitrary")]
13855    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13856        use arbitrary::{Arbitrary, Unstructured};
13857        let mut buf = [0u8; 1024];
13858        rng.fill_bytes(&mut buf);
13859        let mut unstructured = Unstructured::new(&buf);
13860        Self::arbitrary(&mut unstructured).unwrap_or_default()
13861    }
13862}
13863impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13864    fn default() -> Self {
13865        Self::DEFAULT.clone()
13866    }
13867}
13868impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13869    type Message = MavMessage;
13870    const ID: u32 = 280u32;
13871    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13872    const EXTRA_CRC: u8 = 70u8;
13873    const ENCODED_LEN: usize = 33usize;
13874    fn deser(
13875        _version: MavlinkVersion,
13876        __input: &[u8],
13877    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13878        let avail_len = __input.len();
13879        let mut payload_buf = [0; Self::ENCODED_LEN];
13880        let mut buf = if avail_len < Self::ENCODED_LEN {
13881            payload_buf[0..avail_len].copy_from_slice(__input);
13882            Bytes::new(&payload_buf)
13883        } else {
13884            Bytes::new(__input)
13885        };
13886        let mut __struct = Self::default();
13887        __struct.time_boot_ms = buf.get_u32_le();
13888        let tmp = buf.get_u32_le();
13889        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
13890            tmp as <GimbalManagerCapFlags as Flags>::Bits,
13891        )
13892        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13893            flag_type: "GimbalManagerCapFlags",
13894            value: tmp as u64,
13895        })?;
13896        __struct.roll_min = buf.get_f32_le();
13897        __struct.roll_max = buf.get_f32_le();
13898        __struct.pitch_min = buf.get_f32_le();
13899        __struct.pitch_max = buf.get_f32_le();
13900        __struct.yaw_min = buf.get_f32_le();
13901        __struct.yaw_max = buf.get_f32_le();
13902        __struct.gimbal_device_id = buf.get_u8();
13903        Ok(__struct)
13904    }
13905    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13906        let mut __tmp = BytesMut::new(bytes);
13907        #[allow(clippy::absurd_extreme_comparisons)]
13908        #[allow(unused_comparisons)]
13909        if __tmp.remaining() < Self::ENCODED_LEN {
13910            panic!(
13911                "buffer is too small (need {} bytes, but got {})",
13912                Self::ENCODED_LEN,
13913                __tmp.remaining(),
13914            )
13915        }
13916        __tmp.put_u32_le(self.time_boot_ms);
13917        __tmp.put_u32_le(self.cap_flags.bits() as u32);
13918        __tmp.put_f32_le(self.roll_min);
13919        __tmp.put_f32_le(self.roll_max);
13920        __tmp.put_f32_le(self.pitch_min);
13921        __tmp.put_f32_le(self.pitch_max);
13922        __tmp.put_f32_le(self.yaw_min);
13923        __tmp.put_f32_le(self.yaw_max);
13924        __tmp.put_u8(self.gimbal_device_id);
13925        if matches!(version, MavlinkVersion::V2) {
13926            let len = __tmp.len();
13927            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13928        } else {
13929            __tmp.len()
13930        }
13931    }
13932}
13933#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13934#[doc = ""]
13935#[doc = "ID: 282"]
13936#[derive(Debug, Clone, PartialEq)]
13937#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13938#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13939#[cfg_attr(feature = "ts", derive(TS))]
13940#[cfg_attr(feature = "ts", ts(export))]
13941pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13942    #[doc = "High level gimbal manager flags to use."]
13943    pub flags: GimbalManagerFlags,
13944    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13945    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13946    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13947    pub q: [f32; 4],
13948    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13949    pub angular_velocity_x: f32,
13950    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13951    pub angular_velocity_y: f32,
13952    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13953    pub angular_velocity_z: f32,
13954    #[doc = "System ID"]
13955    pub target_system: u8,
13956    #[doc = "Component ID"]
13957    pub target_component: u8,
13958    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13959    pub gimbal_device_id: u8,
13960}
13961impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13962    pub const ENCODED_LEN: usize = 35usize;
13963    pub const DEFAULT: Self = Self {
13964        flags: GimbalManagerFlags::DEFAULT,
13965        q: [0.0_f32; 4usize],
13966        angular_velocity_x: 0.0_f32,
13967        angular_velocity_y: 0.0_f32,
13968        angular_velocity_z: 0.0_f32,
13969        target_system: 0_u8,
13970        target_component: 0_u8,
13971        gimbal_device_id: 0_u8,
13972    };
13973    #[cfg(feature = "arbitrary")]
13974    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13975        use arbitrary::{Arbitrary, Unstructured};
13976        let mut buf = [0u8; 1024];
13977        rng.fill_bytes(&mut buf);
13978        let mut unstructured = Unstructured::new(&buf);
13979        Self::arbitrary(&mut unstructured).unwrap_or_default()
13980    }
13981}
13982impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13983    fn default() -> Self {
13984        Self::DEFAULT.clone()
13985    }
13986}
13987impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13988    type Message = MavMessage;
13989    const ID: u32 = 282u32;
13990    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13991    const EXTRA_CRC: u8 = 123u8;
13992    const ENCODED_LEN: usize = 35usize;
13993    fn deser(
13994        _version: MavlinkVersion,
13995        __input: &[u8],
13996    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13997        let avail_len = __input.len();
13998        let mut payload_buf = [0; Self::ENCODED_LEN];
13999        let mut buf = if avail_len < Self::ENCODED_LEN {
14000            payload_buf[0..avail_len].copy_from_slice(__input);
14001            Bytes::new(&payload_buf)
14002        } else {
14003            Bytes::new(__input)
14004        };
14005        let mut __struct = Self::default();
14006        let tmp = buf.get_u32_le();
14007        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
14008            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14009                flag_type: "GimbalManagerFlags",
14010                value: tmp as u64,
14011            })?;
14012        for v in &mut __struct.q {
14013            let val = buf.get_f32_le();
14014            *v = val;
14015        }
14016        __struct.angular_velocity_x = buf.get_f32_le();
14017        __struct.angular_velocity_y = buf.get_f32_le();
14018        __struct.angular_velocity_z = buf.get_f32_le();
14019        __struct.target_system = buf.get_u8();
14020        __struct.target_component = buf.get_u8();
14021        __struct.gimbal_device_id = buf.get_u8();
14022        Ok(__struct)
14023    }
14024    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14025        let mut __tmp = BytesMut::new(bytes);
14026        #[allow(clippy::absurd_extreme_comparisons)]
14027        #[allow(unused_comparisons)]
14028        if __tmp.remaining() < Self::ENCODED_LEN {
14029            panic!(
14030                "buffer is too small (need {} bytes, but got {})",
14031                Self::ENCODED_LEN,
14032                __tmp.remaining(),
14033            )
14034        }
14035        __tmp.put_u32_le(self.flags.bits() as u32);
14036        for val in &self.q {
14037            __tmp.put_f32_le(*val);
14038        }
14039        __tmp.put_f32_le(self.angular_velocity_x);
14040        __tmp.put_f32_le(self.angular_velocity_y);
14041        __tmp.put_f32_le(self.angular_velocity_z);
14042        __tmp.put_u8(self.target_system);
14043        __tmp.put_u8(self.target_component);
14044        __tmp.put_u8(self.gimbal_device_id);
14045        if matches!(version, MavlinkVersion::V2) {
14046            let len = __tmp.len();
14047            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14048        } else {
14049            __tmp.len()
14050        }
14051    }
14052}
14053#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
14054#[doc = ""]
14055#[doc = "ID: 288"]
14056#[derive(Debug, Clone, PartialEq)]
14057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14059#[cfg_attr(feature = "ts", derive(TS))]
14060#[cfg_attr(feature = "ts", ts(export))]
14061pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14062    #[doc = "High level gimbal manager flags."]
14063    pub flags: GimbalManagerFlags,
14064    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
14065    pub pitch: f32,
14066    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
14067    pub yaw: f32,
14068    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
14069    pub pitch_rate: f32,
14070    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
14071    pub yaw_rate: f32,
14072    #[doc = "System ID"]
14073    pub target_system: u8,
14074    #[doc = "Component ID"]
14075    pub target_component: u8,
14076    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
14077    pub gimbal_device_id: u8,
14078}
14079impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14080    pub const ENCODED_LEN: usize = 23usize;
14081    pub const DEFAULT: Self = Self {
14082        flags: GimbalManagerFlags::DEFAULT,
14083        pitch: 0.0_f32,
14084        yaw: 0.0_f32,
14085        pitch_rate: 0.0_f32,
14086        yaw_rate: 0.0_f32,
14087        target_system: 0_u8,
14088        target_component: 0_u8,
14089        gimbal_device_id: 0_u8,
14090    };
14091    #[cfg(feature = "arbitrary")]
14092    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14093        use arbitrary::{Arbitrary, Unstructured};
14094        let mut buf = [0u8; 1024];
14095        rng.fill_bytes(&mut buf);
14096        let mut unstructured = Unstructured::new(&buf);
14097        Self::arbitrary(&mut unstructured).unwrap_or_default()
14098    }
14099}
14100impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14101    fn default() -> Self {
14102        Self::DEFAULT.clone()
14103    }
14104}
14105impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14106    type Message = MavMessage;
14107    const ID: u32 = 288u32;
14108    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
14109    const EXTRA_CRC: u8 = 20u8;
14110    const ENCODED_LEN: usize = 23usize;
14111    fn deser(
14112        _version: MavlinkVersion,
14113        __input: &[u8],
14114    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14115        let avail_len = __input.len();
14116        let mut payload_buf = [0; Self::ENCODED_LEN];
14117        let mut buf = if avail_len < Self::ENCODED_LEN {
14118            payload_buf[0..avail_len].copy_from_slice(__input);
14119            Bytes::new(&payload_buf)
14120        } else {
14121            Bytes::new(__input)
14122        };
14123        let mut __struct = Self::default();
14124        let tmp = buf.get_u32_le();
14125        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
14126            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14127                flag_type: "GimbalManagerFlags",
14128                value: tmp as u64,
14129            })?;
14130        __struct.pitch = buf.get_f32_le();
14131        __struct.yaw = buf.get_f32_le();
14132        __struct.pitch_rate = buf.get_f32_le();
14133        __struct.yaw_rate = buf.get_f32_le();
14134        __struct.target_system = buf.get_u8();
14135        __struct.target_component = buf.get_u8();
14136        __struct.gimbal_device_id = buf.get_u8();
14137        Ok(__struct)
14138    }
14139    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14140        let mut __tmp = BytesMut::new(bytes);
14141        #[allow(clippy::absurd_extreme_comparisons)]
14142        #[allow(unused_comparisons)]
14143        if __tmp.remaining() < Self::ENCODED_LEN {
14144            panic!(
14145                "buffer is too small (need {} bytes, but got {})",
14146                Self::ENCODED_LEN,
14147                __tmp.remaining(),
14148            )
14149        }
14150        __tmp.put_u32_le(self.flags.bits() as u32);
14151        __tmp.put_f32_le(self.pitch);
14152        __tmp.put_f32_le(self.yaw);
14153        __tmp.put_f32_le(self.pitch_rate);
14154        __tmp.put_f32_le(self.yaw_rate);
14155        __tmp.put_u8(self.target_system);
14156        __tmp.put_u8(self.target_component);
14157        __tmp.put_u8(self.gimbal_device_id);
14158        if matches!(version, MavlinkVersion::V2) {
14159            let len = __tmp.len();
14160            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14161        } else {
14162            __tmp.len()
14163        }
14164    }
14165}
14166#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
14167#[doc = ""]
14168#[doc = "ID: 287"]
14169#[derive(Debug, Clone, PartialEq)]
14170#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14172#[cfg_attr(feature = "ts", derive(TS))]
14173#[cfg_attr(feature = "ts", ts(export))]
14174pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14175    #[doc = "High level gimbal manager flags to use."]
14176    pub flags: GimbalManagerFlags,
14177    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
14178    pub pitch: f32,
14179    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
14180    pub yaw: f32,
14181    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
14182    pub pitch_rate: f32,
14183    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
14184    pub yaw_rate: f32,
14185    #[doc = "System ID"]
14186    pub target_system: u8,
14187    #[doc = "Component ID"]
14188    pub target_component: u8,
14189    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
14190    pub gimbal_device_id: u8,
14191}
14192impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14193    pub const ENCODED_LEN: usize = 23usize;
14194    pub const DEFAULT: Self = Self {
14195        flags: GimbalManagerFlags::DEFAULT,
14196        pitch: 0.0_f32,
14197        yaw: 0.0_f32,
14198        pitch_rate: 0.0_f32,
14199        yaw_rate: 0.0_f32,
14200        target_system: 0_u8,
14201        target_component: 0_u8,
14202        gimbal_device_id: 0_u8,
14203    };
14204    #[cfg(feature = "arbitrary")]
14205    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14206        use arbitrary::{Arbitrary, Unstructured};
14207        let mut buf = [0u8; 1024];
14208        rng.fill_bytes(&mut buf);
14209        let mut unstructured = Unstructured::new(&buf);
14210        Self::arbitrary(&mut unstructured).unwrap_or_default()
14211    }
14212}
14213impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14214    fn default() -> Self {
14215        Self::DEFAULT.clone()
14216    }
14217}
14218impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14219    type Message = MavMessage;
14220    const ID: u32 = 287u32;
14221    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
14222    const EXTRA_CRC: u8 = 1u8;
14223    const ENCODED_LEN: usize = 23usize;
14224    fn deser(
14225        _version: MavlinkVersion,
14226        __input: &[u8],
14227    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14228        let avail_len = __input.len();
14229        let mut payload_buf = [0; Self::ENCODED_LEN];
14230        let mut buf = if avail_len < Self::ENCODED_LEN {
14231            payload_buf[0..avail_len].copy_from_slice(__input);
14232            Bytes::new(&payload_buf)
14233        } else {
14234            Bytes::new(__input)
14235        };
14236        let mut __struct = Self::default();
14237        let tmp = buf.get_u32_le();
14238        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
14239            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14240                flag_type: "GimbalManagerFlags",
14241                value: tmp as u64,
14242            })?;
14243        __struct.pitch = buf.get_f32_le();
14244        __struct.yaw = buf.get_f32_le();
14245        __struct.pitch_rate = buf.get_f32_le();
14246        __struct.yaw_rate = buf.get_f32_le();
14247        __struct.target_system = buf.get_u8();
14248        __struct.target_component = buf.get_u8();
14249        __struct.gimbal_device_id = buf.get_u8();
14250        Ok(__struct)
14251    }
14252    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14253        let mut __tmp = BytesMut::new(bytes);
14254        #[allow(clippy::absurd_extreme_comparisons)]
14255        #[allow(unused_comparisons)]
14256        if __tmp.remaining() < Self::ENCODED_LEN {
14257            panic!(
14258                "buffer is too small (need {} bytes, but got {})",
14259                Self::ENCODED_LEN,
14260                __tmp.remaining(),
14261            )
14262        }
14263        __tmp.put_u32_le(self.flags.bits() as u32);
14264        __tmp.put_f32_le(self.pitch);
14265        __tmp.put_f32_le(self.yaw);
14266        __tmp.put_f32_le(self.pitch_rate);
14267        __tmp.put_f32_le(self.yaw_rate);
14268        __tmp.put_u8(self.target_system);
14269        __tmp.put_u8(self.target_component);
14270        __tmp.put_u8(self.gimbal_device_id);
14271        if matches!(version, MavlinkVersion::V2) {
14272            let len = __tmp.len();
14273            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14274        } else {
14275            __tmp.len()
14276        }
14277    }
14278}
14279#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
14280#[doc = ""]
14281#[doc = "ID: 281"]
14282#[derive(Debug, Clone, PartialEq)]
14283#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14284#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14285#[cfg_attr(feature = "ts", derive(TS))]
14286#[cfg_attr(feature = "ts", ts(export))]
14287pub struct GIMBAL_MANAGER_STATUS_DATA {
14288    #[doc = "Timestamp (time since system boot)."]
14289    pub time_boot_ms: u32,
14290    #[doc = "High level gimbal manager flags currently applied."]
14291    pub flags: GimbalManagerFlags,
14292    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
14293    pub gimbal_device_id: u8,
14294    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
14295    pub primary_control_sysid: u8,
14296    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
14297    pub primary_control_compid: u8,
14298    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
14299    pub secondary_control_sysid: u8,
14300    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
14301    pub secondary_control_compid: u8,
14302}
14303impl GIMBAL_MANAGER_STATUS_DATA {
14304    pub const ENCODED_LEN: usize = 13usize;
14305    pub const DEFAULT: Self = Self {
14306        time_boot_ms: 0_u32,
14307        flags: GimbalManagerFlags::DEFAULT,
14308        gimbal_device_id: 0_u8,
14309        primary_control_sysid: 0_u8,
14310        primary_control_compid: 0_u8,
14311        secondary_control_sysid: 0_u8,
14312        secondary_control_compid: 0_u8,
14313    };
14314    #[cfg(feature = "arbitrary")]
14315    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14316        use arbitrary::{Arbitrary, Unstructured};
14317        let mut buf = [0u8; 1024];
14318        rng.fill_bytes(&mut buf);
14319        let mut unstructured = Unstructured::new(&buf);
14320        Self::arbitrary(&mut unstructured).unwrap_or_default()
14321    }
14322}
14323impl Default for GIMBAL_MANAGER_STATUS_DATA {
14324    fn default() -> Self {
14325        Self::DEFAULT.clone()
14326    }
14327}
14328impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
14329    type Message = MavMessage;
14330    const ID: u32 = 281u32;
14331    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
14332    const EXTRA_CRC: u8 = 48u8;
14333    const ENCODED_LEN: usize = 13usize;
14334    fn deser(
14335        _version: MavlinkVersion,
14336        __input: &[u8],
14337    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14338        let avail_len = __input.len();
14339        let mut payload_buf = [0; Self::ENCODED_LEN];
14340        let mut buf = if avail_len < Self::ENCODED_LEN {
14341            payload_buf[0..avail_len].copy_from_slice(__input);
14342            Bytes::new(&payload_buf)
14343        } else {
14344            Bytes::new(__input)
14345        };
14346        let mut __struct = Self::default();
14347        __struct.time_boot_ms = buf.get_u32_le();
14348        let tmp = buf.get_u32_le();
14349        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
14350            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14351                flag_type: "GimbalManagerFlags",
14352                value: tmp as u64,
14353            })?;
14354        __struct.gimbal_device_id = buf.get_u8();
14355        __struct.primary_control_sysid = buf.get_u8();
14356        __struct.primary_control_compid = buf.get_u8();
14357        __struct.secondary_control_sysid = buf.get_u8();
14358        __struct.secondary_control_compid = buf.get_u8();
14359        Ok(__struct)
14360    }
14361    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14362        let mut __tmp = BytesMut::new(bytes);
14363        #[allow(clippy::absurd_extreme_comparisons)]
14364        #[allow(unused_comparisons)]
14365        if __tmp.remaining() < Self::ENCODED_LEN {
14366            panic!(
14367                "buffer is too small (need {} bytes, but got {})",
14368                Self::ENCODED_LEN,
14369                __tmp.remaining(),
14370            )
14371        }
14372        __tmp.put_u32_le(self.time_boot_ms);
14373        __tmp.put_u32_le(self.flags.bits() as u32);
14374        __tmp.put_u8(self.gimbal_device_id);
14375        __tmp.put_u8(self.primary_control_sysid);
14376        __tmp.put_u8(self.primary_control_compid);
14377        __tmp.put_u8(self.secondary_control_sysid);
14378        __tmp.put_u8(self.secondary_control_compid);
14379        if matches!(version, MavlinkVersion::V2) {
14380            let len = __tmp.len();
14381            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14382        } else {
14383            __tmp.len()
14384        }
14385    }
14386}
14387#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
14388#[doc = ""]
14389#[doc = "ID: 33"]
14390#[derive(Debug, Clone, PartialEq)]
14391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14393#[cfg_attr(feature = "ts", derive(TS))]
14394#[cfg_attr(feature = "ts", ts(export))]
14395pub struct GLOBAL_POSITION_INT_DATA {
14396    #[doc = "Timestamp (time since system boot)."]
14397    pub time_boot_ms: u32,
14398    #[doc = "Latitude, expressed"]
14399    pub lat: i32,
14400    #[doc = "Longitude, expressed"]
14401    pub lon: i32,
14402    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
14403    pub alt: i32,
14404    #[doc = "Altitude above home"]
14405    pub relative_alt: i32,
14406    #[doc = "Ground X Speed (Latitude, positive north)"]
14407    pub vx: i16,
14408    #[doc = "Ground Y Speed (Longitude, positive east)"]
14409    pub vy: i16,
14410    #[doc = "Ground Z Speed (Altitude, positive down)"]
14411    pub vz: i16,
14412    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14413    pub hdg: u16,
14414}
14415impl GLOBAL_POSITION_INT_DATA {
14416    pub const ENCODED_LEN: usize = 28usize;
14417    pub const DEFAULT: Self = Self {
14418        time_boot_ms: 0_u32,
14419        lat: 0_i32,
14420        lon: 0_i32,
14421        alt: 0_i32,
14422        relative_alt: 0_i32,
14423        vx: 0_i16,
14424        vy: 0_i16,
14425        vz: 0_i16,
14426        hdg: 0_u16,
14427    };
14428    #[cfg(feature = "arbitrary")]
14429    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14430        use arbitrary::{Arbitrary, Unstructured};
14431        let mut buf = [0u8; 1024];
14432        rng.fill_bytes(&mut buf);
14433        let mut unstructured = Unstructured::new(&buf);
14434        Self::arbitrary(&mut unstructured).unwrap_or_default()
14435    }
14436}
14437impl Default for GLOBAL_POSITION_INT_DATA {
14438    fn default() -> Self {
14439        Self::DEFAULT.clone()
14440    }
14441}
14442impl MessageData for GLOBAL_POSITION_INT_DATA {
14443    type Message = MavMessage;
14444    const ID: u32 = 33u32;
14445    const NAME: &'static str = "GLOBAL_POSITION_INT";
14446    const EXTRA_CRC: u8 = 104u8;
14447    const ENCODED_LEN: usize = 28usize;
14448    fn deser(
14449        _version: MavlinkVersion,
14450        __input: &[u8],
14451    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14452        let avail_len = __input.len();
14453        let mut payload_buf = [0; Self::ENCODED_LEN];
14454        let mut buf = if avail_len < Self::ENCODED_LEN {
14455            payload_buf[0..avail_len].copy_from_slice(__input);
14456            Bytes::new(&payload_buf)
14457        } else {
14458            Bytes::new(__input)
14459        };
14460        let mut __struct = Self::default();
14461        __struct.time_boot_ms = buf.get_u32_le();
14462        __struct.lat = buf.get_i32_le();
14463        __struct.lon = buf.get_i32_le();
14464        __struct.alt = buf.get_i32_le();
14465        __struct.relative_alt = buf.get_i32_le();
14466        __struct.vx = buf.get_i16_le();
14467        __struct.vy = buf.get_i16_le();
14468        __struct.vz = buf.get_i16_le();
14469        __struct.hdg = buf.get_u16_le();
14470        Ok(__struct)
14471    }
14472    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14473        let mut __tmp = BytesMut::new(bytes);
14474        #[allow(clippy::absurd_extreme_comparisons)]
14475        #[allow(unused_comparisons)]
14476        if __tmp.remaining() < Self::ENCODED_LEN {
14477            panic!(
14478                "buffer is too small (need {} bytes, but got {})",
14479                Self::ENCODED_LEN,
14480                __tmp.remaining(),
14481            )
14482        }
14483        __tmp.put_u32_le(self.time_boot_ms);
14484        __tmp.put_i32_le(self.lat);
14485        __tmp.put_i32_le(self.lon);
14486        __tmp.put_i32_le(self.alt);
14487        __tmp.put_i32_le(self.relative_alt);
14488        __tmp.put_i16_le(self.vx);
14489        __tmp.put_i16_le(self.vy);
14490        __tmp.put_i16_le(self.vz);
14491        __tmp.put_u16_le(self.hdg);
14492        if matches!(version, MavlinkVersion::V2) {
14493            let len = __tmp.len();
14494            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14495        } else {
14496            __tmp.len()
14497        }
14498    }
14499}
14500#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
14501#[doc = ""]
14502#[doc = "ID: 63"]
14503#[derive(Debug, Clone, PartialEq)]
14504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14505#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14506#[cfg_attr(feature = "ts", derive(TS))]
14507#[cfg_attr(feature = "ts", ts(export))]
14508pub struct GLOBAL_POSITION_INT_COV_DATA {
14509    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14510    pub time_usec: u64,
14511    #[doc = "Latitude"]
14512    pub lat: i32,
14513    #[doc = "Longitude"]
14514    pub lon: i32,
14515    #[doc = "Altitude in meters above MSL"]
14516    pub alt: i32,
14517    #[doc = "Altitude above ground"]
14518    pub relative_alt: i32,
14519    #[doc = "Ground X Speed (Latitude)"]
14520    pub vx: f32,
14521    #[doc = "Ground Y Speed (Longitude)"]
14522    pub vy: f32,
14523    #[doc = "Ground Z Speed (Altitude)"]
14524    pub vz: f32,
14525    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
14526    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14527    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14528    pub covariance: [f32; 36],
14529    #[doc = "Class id of the estimator this estimate originated from."]
14530    pub estimator_type: MavEstimatorType,
14531}
14532impl GLOBAL_POSITION_INT_COV_DATA {
14533    pub const ENCODED_LEN: usize = 181usize;
14534    pub const DEFAULT: Self = Self {
14535        time_usec: 0_u64,
14536        lat: 0_i32,
14537        lon: 0_i32,
14538        alt: 0_i32,
14539        relative_alt: 0_i32,
14540        vx: 0.0_f32,
14541        vy: 0.0_f32,
14542        vz: 0.0_f32,
14543        covariance: [0.0_f32; 36usize],
14544        estimator_type: MavEstimatorType::DEFAULT,
14545    };
14546    #[cfg(feature = "arbitrary")]
14547    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14548        use arbitrary::{Arbitrary, Unstructured};
14549        let mut buf = [0u8; 1024];
14550        rng.fill_bytes(&mut buf);
14551        let mut unstructured = Unstructured::new(&buf);
14552        Self::arbitrary(&mut unstructured).unwrap_or_default()
14553    }
14554}
14555impl Default for GLOBAL_POSITION_INT_COV_DATA {
14556    fn default() -> Self {
14557        Self::DEFAULT.clone()
14558    }
14559}
14560impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
14561    type Message = MavMessage;
14562    const ID: u32 = 63u32;
14563    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
14564    const EXTRA_CRC: u8 = 119u8;
14565    const ENCODED_LEN: usize = 181usize;
14566    fn deser(
14567        _version: MavlinkVersion,
14568        __input: &[u8],
14569    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14570        let avail_len = __input.len();
14571        let mut payload_buf = [0; Self::ENCODED_LEN];
14572        let mut buf = if avail_len < Self::ENCODED_LEN {
14573            payload_buf[0..avail_len].copy_from_slice(__input);
14574            Bytes::new(&payload_buf)
14575        } else {
14576            Bytes::new(__input)
14577        };
14578        let mut __struct = Self::default();
14579        __struct.time_usec = buf.get_u64_le();
14580        __struct.lat = buf.get_i32_le();
14581        __struct.lon = buf.get_i32_le();
14582        __struct.alt = buf.get_i32_le();
14583        __struct.relative_alt = buf.get_i32_le();
14584        __struct.vx = buf.get_f32_le();
14585        __struct.vy = buf.get_f32_le();
14586        __struct.vz = buf.get_f32_le();
14587        for v in &mut __struct.covariance {
14588            let val = buf.get_f32_le();
14589            *v = val;
14590        }
14591        let tmp = buf.get_u8();
14592        __struct.estimator_type =
14593            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14594                enum_type: "MavEstimatorType",
14595                value: tmp as u64,
14596            })?;
14597        Ok(__struct)
14598    }
14599    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14600        let mut __tmp = BytesMut::new(bytes);
14601        #[allow(clippy::absurd_extreme_comparisons)]
14602        #[allow(unused_comparisons)]
14603        if __tmp.remaining() < Self::ENCODED_LEN {
14604            panic!(
14605                "buffer is too small (need {} bytes, but got {})",
14606                Self::ENCODED_LEN,
14607                __tmp.remaining(),
14608            )
14609        }
14610        __tmp.put_u64_le(self.time_usec);
14611        __tmp.put_i32_le(self.lat);
14612        __tmp.put_i32_le(self.lon);
14613        __tmp.put_i32_le(self.alt);
14614        __tmp.put_i32_le(self.relative_alt);
14615        __tmp.put_f32_le(self.vx);
14616        __tmp.put_f32_le(self.vy);
14617        __tmp.put_f32_le(self.vz);
14618        for val in &self.covariance {
14619            __tmp.put_f32_le(*val);
14620        }
14621        __tmp.put_u8(self.estimator_type as u8);
14622        if matches!(version, MavlinkVersion::V2) {
14623            let len = __tmp.len();
14624            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14625        } else {
14626            __tmp.len()
14627        }
14628    }
14629}
14630#[doc = "Global position/attitude estimate from a vision source."]
14631#[doc = ""]
14632#[doc = "ID: 101"]
14633#[derive(Debug, Clone, PartialEq)]
14634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14635#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14636#[cfg_attr(feature = "ts", derive(TS))]
14637#[cfg_attr(feature = "ts", ts(export))]
14638pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14639    #[doc = "Timestamp (UNIX time or since system boot)"]
14640    pub usec: u64,
14641    #[doc = "Global X position"]
14642    pub x: f32,
14643    #[doc = "Global Y position"]
14644    pub y: f32,
14645    #[doc = "Global Z position"]
14646    pub z: f32,
14647    #[doc = "Roll angle"]
14648    pub roll: f32,
14649    #[doc = "Pitch angle"]
14650    pub pitch: f32,
14651    #[doc = "Yaw angle"]
14652    pub yaw: f32,
14653    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
14654    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14655    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14656    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14657    pub covariance: [f32; 21],
14658    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
14659    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14660    pub reset_counter: u8,
14661}
14662impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14663    pub const ENCODED_LEN: usize = 117usize;
14664    pub const DEFAULT: Self = Self {
14665        usec: 0_u64,
14666        x: 0.0_f32,
14667        y: 0.0_f32,
14668        z: 0.0_f32,
14669        roll: 0.0_f32,
14670        pitch: 0.0_f32,
14671        yaw: 0.0_f32,
14672        covariance: [0.0_f32; 21usize],
14673        reset_counter: 0_u8,
14674    };
14675    #[cfg(feature = "arbitrary")]
14676    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14677        use arbitrary::{Arbitrary, Unstructured};
14678        let mut buf = [0u8; 1024];
14679        rng.fill_bytes(&mut buf);
14680        let mut unstructured = Unstructured::new(&buf);
14681        Self::arbitrary(&mut unstructured).unwrap_or_default()
14682    }
14683}
14684impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14685    fn default() -> Self {
14686        Self::DEFAULT.clone()
14687    }
14688}
14689impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14690    type Message = MavMessage;
14691    const ID: u32 = 101u32;
14692    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
14693    const EXTRA_CRC: u8 = 102u8;
14694    const ENCODED_LEN: usize = 117usize;
14695    fn deser(
14696        _version: MavlinkVersion,
14697        __input: &[u8],
14698    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14699        let avail_len = __input.len();
14700        let mut payload_buf = [0; Self::ENCODED_LEN];
14701        let mut buf = if avail_len < Self::ENCODED_LEN {
14702            payload_buf[0..avail_len].copy_from_slice(__input);
14703            Bytes::new(&payload_buf)
14704        } else {
14705            Bytes::new(__input)
14706        };
14707        let mut __struct = Self::default();
14708        __struct.usec = buf.get_u64_le();
14709        __struct.x = buf.get_f32_le();
14710        __struct.y = buf.get_f32_le();
14711        __struct.z = buf.get_f32_le();
14712        __struct.roll = buf.get_f32_le();
14713        __struct.pitch = buf.get_f32_le();
14714        __struct.yaw = buf.get_f32_le();
14715        for v in &mut __struct.covariance {
14716            let val = buf.get_f32_le();
14717            *v = val;
14718        }
14719        __struct.reset_counter = buf.get_u8();
14720        Ok(__struct)
14721    }
14722    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14723        let mut __tmp = BytesMut::new(bytes);
14724        #[allow(clippy::absurd_extreme_comparisons)]
14725        #[allow(unused_comparisons)]
14726        if __tmp.remaining() < Self::ENCODED_LEN {
14727            panic!(
14728                "buffer is too small (need {} bytes, but got {})",
14729                Self::ENCODED_LEN,
14730                __tmp.remaining(),
14731            )
14732        }
14733        __tmp.put_u64_le(self.usec);
14734        __tmp.put_f32_le(self.x);
14735        __tmp.put_f32_le(self.y);
14736        __tmp.put_f32_le(self.z);
14737        __tmp.put_f32_le(self.roll);
14738        __tmp.put_f32_le(self.pitch);
14739        __tmp.put_f32_le(self.yaw);
14740        if matches!(version, MavlinkVersion::V2) {
14741            for val in &self.covariance {
14742                __tmp.put_f32_le(*val);
14743            }
14744            __tmp.put_u8(self.reset_counter);
14745            let len = __tmp.len();
14746            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14747        } else {
14748            __tmp.len()
14749        }
14750    }
14751}
14752#[doc = "Second GPS data."]
14753#[doc = ""]
14754#[doc = "ID: 124"]
14755#[derive(Debug, Clone, PartialEq)]
14756#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14757#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14758#[cfg_attr(feature = "ts", derive(TS))]
14759#[cfg_attr(feature = "ts", ts(export))]
14760pub struct GPS2_RAW_DATA {
14761    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14762    pub time_usec: u64,
14763    #[doc = "Latitude (WGS84)"]
14764    pub lat: i32,
14765    #[doc = "Longitude (WGS84)"]
14766    pub lon: i32,
14767    #[doc = "Altitude (MSL). Positive for up."]
14768    pub alt: i32,
14769    #[doc = "Age of DGPS info"]
14770    pub dgps_age: u32,
14771    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14772    pub eph: u16,
14773    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14774    pub epv: u16,
14775    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14776    pub vel: u16,
14777    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14778    pub cog: u16,
14779    #[doc = "GPS fix type."]
14780    pub fix_type: GpsFixType,
14781    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14782    pub satellites_visible: u8,
14783    #[doc = "Number of DGPS satellites"]
14784    pub dgps_numch: u8,
14785    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14786    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14787    pub yaw: u16,
14788    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14789    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14790    pub alt_ellipsoid: i32,
14791    #[doc = "Position uncertainty."]
14792    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14793    pub h_acc: u32,
14794    #[doc = "Altitude uncertainty."]
14795    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14796    pub v_acc: u32,
14797    #[doc = "Speed uncertainty."]
14798    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14799    pub vel_acc: u32,
14800    #[doc = "Heading / track uncertainty"]
14801    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14802    pub hdg_acc: u32,
14803}
14804impl GPS2_RAW_DATA {
14805    pub const ENCODED_LEN: usize = 57usize;
14806    pub const DEFAULT: Self = Self {
14807        time_usec: 0_u64,
14808        lat: 0_i32,
14809        lon: 0_i32,
14810        alt: 0_i32,
14811        dgps_age: 0_u32,
14812        eph: 0_u16,
14813        epv: 0_u16,
14814        vel: 0_u16,
14815        cog: 0_u16,
14816        fix_type: GpsFixType::DEFAULT,
14817        satellites_visible: 0_u8,
14818        dgps_numch: 0_u8,
14819        yaw: 0_u16,
14820        alt_ellipsoid: 0_i32,
14821        h_acc: 0_u32,
14822        v_acc: 0_u32,
14823        vel_acc: 0_u32,
14824        hdg_acc: 0_u32,
14825    };
14826    #[cfg(feature = "arbitrary")]
14827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14828        use arbitrary::{Arbitrary, Unstructured};
14829        let mut buf = [0u8; 1024];
14830        rng.fill_bytes(&mut buf);
14831        let mut unstructured = Unstructured::new(&buf);
14832        Self::arbitrary(&mut unstructured).unwrap_or_default()
14833    }
14834}
14835impl Default for GPS2_RAW_DATA {
14836    fn default() -> Self {
14837        Self::DEFAULT.clone()
14838    }
14839}
14840impl MessageData for GPS2_RAW_DATA {
14841    type Message = MavMessage;
14842    const ID: u32 = 124u32;
14843    const NAME: &'static str = "GPS2_RAW";
14844    const EXTRA_CRC: u8 = 87u8;
14845    const ENCODED_LEN: usize = 57usize;
14846    fn deser(
14847        _version: MavlinkVersion,
14848        __input: &[u8],
14849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14850        let avail_len = __input.len();
14851        let mut payload_buf = [0; Self::ENCODED_LEN];
14852        let mut buf = if avail_len < Self::ENCODED_LEN {
14853            payload_buf[0..avail_len].copy_from_slice(__input);
14854            Bytes::new(&payload_buf)
14855        } else {
14856            Bytes::new(__input)
14857        };
14858        let mut __struct = Self::default();
14859        __struct.time_usec = buf.get_u64_le();
14860        __struct.lat = buf.get_i32_le();
14861        __struct.lon = buf.get_i32_le();
14862        __struct.alt = buf.get_i32_le();
14863        __struct.dgps_age = buf.get_u32_le();
14864        __struct.eph = buf.get_u16_le();
14865        __struct.epv = buf.get_u16_le();
14866        __struct.vel = buf.get_u16_le();
14867        __struct.cog = buf.get_u16_le();
14868        let tmp = buf.get_u8();
14869        __struct.fix_type =
14870            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14871                enum_type: "GpsFixType",
14872                value: tmp as u64,
14873            })?;
14874        __struct.satellites_visible = buf.get_u8();
14875        __struct.dgps_numch = buf.get_u8();
14876        __struct.yaw = buf.get_u16_le();
14877        __struct.alt_ellipsoid = buf.get_i32_le();
14878        __struct.h_acc = buf.get_u32_le();
14879        __struct.v_acc = buf.get_u32_le();
14880        __struct.vel_acc = buf.get_u32_le();
14881        __struct.hdg_acc = buf.get_u32_le();
14882        Ok(__struct)
14883    }
14884    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14885        let mut __tmp = BytesMut::new(bytes);
14886        #[allow(clippy::absurd_extreme_comparisons)]
14887        #[allow(unused_comparisons)]
14888        if __tmp.remaining() < Self::ENCODED_LEN {
14889            panic!(
14890                "buffer is too small (need {} bytes, but got {})",
14891                Self::ENCODED_LEN,
14892                __tmp.remaining(),
14893            )
14894        }
14895        __tmp.put_u64_le(self.time_usec);
14896        __tmp.put_i32_le(self.lat);
14897        __tmp.put_i32_le(self.lon);
14898        __tmp.put_i32_le(self.alt);
14899        __tmp.put_u32_le(self.dgps_age);
14900        __tmp.put_u16_le(self.eph);
14901        __tmp.put_u16_le(self.epv);
14902        __tmp.put_u16_le(self.vel);
14903        __tmp.put_u16_le(self.cog);
14904        __tmp.put_u8(self.fix_type as u8);
14905        __tmp.put_u8(self.satellites_visible);
14906        __tmp.put_u8(self.dgps_numch);
14907        if matches!(version, MavlinkVersion::V2) {
14908            __tmp.put_u16_le(self.yaw);
14909            __tmp.put_i32_le(self.alt_ellipsoid);
14910            __tmp.put_u32_le(self.h_acc);
14911            __tmp.put_u32_le(self.v_acc);
14912            __tmp.put_u32_le(self.vel_acc);
14913            __tmp.put_u32_le(self.hdg_acc);
14914            let len = __tmp.len();
14915            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14916        } else {
14917            __tmp.len()
14918        }
14919    }
14920}
14921#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14922#[doc = ""]
14923#[doc = "ID: 128"]
14924#[derive(Debug, Clone, PartialEq)]
14925#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14926#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14927#[cfg_attr(feature = "ts", derive(TS))]
14928#[cfg_attr(feature = "ts", ts(export))]
14929pub struct GPS2_RTK_DATA {
14930    #[doc = "Time since boot of last baseline message received."]
14931    pub time_last_baseline_ms: u32,
14932    #[doc = "GPS Time of Week of last baseline"]
14933    pub tow: u32,
14934    #[doc = "Current baseline in ECEF x or NED north component."]
14935    pub baseline_a_mm: i32,
14936    #[doc = "Current baseline in ECEF y or NED east component."]
14937    pub baseline_b_mm: i32,
14938    #[doc = "Current baseline in ECEF z or NED down component."]
14939    pub baseline_c_mm: i32,
14940    #[doc = "Current estimate of baseline accuracy."]
14941    pub accuracy: u32,
14942    #[doc = "Current number of integer ambiguity hypotheses."]
14943    pub iar_num_hypotheses: i32,
14944    #[doc = "GPS Week Number of last baseline"]
14945    pub wn: u16,
14946    #[doc = "Identification of connected RTK receiver."]
14947    pub rtk_receiver_id: u8,
14948    #[doc = "GPS-specific health report for RTK data."]
14949    pub rtk_health: u8,
14950    #[doc = "Rate of baseline messages being received by GPS"]
14951    pub rtk_rate: u8,
14952    #[doc = "Current number of sats used for RTK calculation."]
14953    pub nsats: u8,
14954    #[doc = "Coordinate system of baseline"]
14955    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14956}
14957impl GPS2_RTK_DATA {
14958    pub const ENCODED_LEN: usize = 35usize;
14959    pub const DEFAULT: Self = Self {
14960        time_last_baseline_ms: 0_u32,
14961        tow: 0_u32,
14962        baseline_a_mm: 0_i32,
14963        baseline_b_mm: 0_i32,
14964        baseline_c_mm: 0_i32,
14965        accuracy: 0_u32,
14966        iar_num_hypotheses: 0_i32,
14967        wn: 0_u16,
14968        rtk_receiver_id: 0_u8,
14969        rtk_health: 0_u8,
14970        rtk_rate: 0_u8,
14971        nsats: 0_u8,
14972        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14973    };
14974    #[cfg(feature = "arbitrary")]
14975    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14976        use arbitrary::{Arbitrary, Unstructured};
14977        let mut buf = [0u8; 1024];
14978        rng.fill_bytes(&mut buf);
14979        let mut unstructured = Unstructured::new(&buf);
14980        Self::arbitrary(&mut unstructured).unwrap_or_default()
14981    }
14982}
14983impl Default for GPS2_RTK_DATA {
14984    fn default() -> Self {
14985        Self::DEFAULT.clone()
14986    }
14987}
14988impl MessageData for GPS2_RTK_DATA {
14989    type Message = MavMessage;
14990    const ID: u32 = 128u32;
14991    const NAME: &'static str = "GPS2_RTK";
14992    const EXTRA_CRC: u8 = 226u8;
14993    const ENCODED_LEN: usize = 35usize;
14994    fn deser(
14995        _version: MavlinkVersion,
14996        __input: &[u8],
14997    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14998        let avail_len = __input.len();
14999        let mut payload_buf = [0; Self::ENCODED_LEN];
15000        let mut buf = if avail_len < Self::ENCODED_LEN {
15001            payload_buf[0..avail_len].copy_from_slice(__input);
15002            Bytes::new(&payload_buf)
15003        } else {
15004            Bytes::new(__input)
15005        };
15006        let mut __struct = Self::default();
15007        __struct.time_last_baseline_ms = buf.get_u32_le();
15008        __struct.tow = buf.get_u32_le();
15009        __struct.baseline_a_mm = buf.get_i32_le();
15010        __struct.baseline_b_mm = buf.get_i32_le();
15011        __struct.baseline_c_mm = buf.get_i32_le();
15012        __struct.accuracy = buf.get_u32_le();
15013        __struct.iar_num_hypotheses = buf.get_i32_le();
15014        __struct.wn = buf.get_u16_le();
15015        __struct.rtk_receiver_id = buf.get_u8();
15016        __struct.rtk_health = buf.get_u8();
15017        __struct.rtk_rate = buf.get_u8();
15018        __struct.nsats = buf.get_u8();
15019        let tmp = buf.get_u8();
15020        __struct.baseline_coords_type =
15021            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15022                enum_type: "RtkBaselineCoordinateSystem",
15023                value: tmp as u64,
15024            })?;
15025        Ok(__struct)
15026    }
15027    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15028        let mut __tmp = BytesMut::new(bytes);
15029        #[allow(clippy::absurd_extreme_comparisons)]
15030        #[allow(unused_comparisons)]
15031        if __tmp.remaining() < Self::ENCODED_LEN {
15032            panic!(
15033                "buffer is too small (need {} bytes, but got {})",
15034                Self::ENCODED_LEN,
15035                __tmp.remaining(),
15036            )
15037        }
15038        __tmp.put_u32_le(self.time_last_baseline_ms);
15039        __tmp.put_u32_le(self.tow);
15040        __tmp.put_i32_le(self.baseline_a_mm);
15041        __tmp.put_i32_le(self.baseline_b_mm);
15042        __tmp.put_i32_le(self.baseline_c_mm);
15043        __tmp.put_u32_le(self.accuracy);
15044        __tmp.put_i32_le(self.iar_num_hypotheses);
15045        __tmp.put_u16_le(self.wn);
15046        __tmp.put_u8(self.rtk_receiver_id);
15047        __tmp.put_u8(self.rtk_health);
15048        __tmp.put_u8(self.rtk_rate);
15049        __tmp.put_u8(self.nsats);
15050        __tmp.put_u8(self.baseline_coords_type as u8);
15051        if matches!(version, MavlinkVersion::V2) {
15052            let len = __tmp.len();
15053            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15054        } else {
15055            __tmp.len()
15056        }
15057    }
15058}
15059#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
15060#[doc = ""]
15061#[doc = "ID: 49"]
15062#[derive(Debug, Clone, PartialEq)]
15063#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15064#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15065#[cfg_attr(feature = "ts", derive(TS))]
15066#[cfg_attr(feature = "ts", ts(export))]
15067pub struct GPS_GLOBAL_ORIGIN_DATA {
15068    #[doc = "Latitude (WGS84)"]
15069    pub latitude: i32,
15070    #[doc = "Longitude (WGS84)"]
15071    pub longitude: i32,
15072    #[doc = "Altitude (MSL). Positive for up."]
15073    pub altitude: i32,
15074    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15075    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15076    pub time_usec: u64,
15077}
15078impl GPS_GLOBAL_ORIGIN_DATA {
15079    pub const ENCODED_LEN: usize = 20usize;
15080    pub const DEFAULT: Self = Self {
15081        latitude: 0_i32,
15082        longitude: 0_i32,
15083        altitude: 0_i32,
15084        time_usec: 0_u64,
15085    };
15086    #[cfg(feature = "arbitrary")]
15087    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15088        use arbitrary::{Arbitrary, Unstructured};
15089        let mut buf = [0u8; 1024];
15090        rng.fill_bytes(&mut buf);
15091        let mut unstructured = Unstructured::new(&buf);
15092        Self::arbitrary(&mut unstructured).unwrap_or_default()
15093    }
15094}
15095impl Default for GPS_GLOBAL_ORIGIN_DATA {
15096    fn default() -> Self {
15097        Self::DEFAULT.clone()
15098    }
15099}
15100impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
15101    type Message = MavMessage;
15102    const ID: u32 = 49u32;
15103    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
15104    const EXTRA_CRC: u8 = 39u8;
15105    const ENCODED_LEN: usize = 20usize;
15106    fn deser(
15107        _version: MavlinkVersion,
15108        __input: &[u8],
15109    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15110        let avail_len = __input.len();
15111        let mut payload_buf = [0; Self::ENCODED_LEN];
15112        let mut buf = if avail_len < Self::ENCODED_LEN {
15113            payload_buf[0..avail_len].copy_from_slice(__input);
15114            Bytes::new(&payload_buf)
15115        } else {
15116            Bytes::new(__input)
15117        };
15118        let mut __struct = Self::default();
15119        __struct.latitude = buf.get_i32_le();
15120        __struct.longitude = buf.get_i32_le();
15121        __struct.altitude = buf.get_i32_le();
15122        __struct.time_usec = buf.get_u64_le();
15123        Ok(__struct)
15124    }
15125    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15126        let mut __tmp = BytesMut::new(bytes);
15127        #[allow(clippy::absurd_extreme_comparisons)]
15128        #[allow(unused_comparisons)]
15129        if __tmp.remaining() < Self::ENCODED_LEN {
15130            panic!(
15131                "buffer is too small (need {} bytes, but got {})",
15132                Self::ENCODED_LEN,
15133                __tmp.remaining(),
15134            )
15135        }
15136        __tmp.put_i32_le(self.latitude);
15137        __tmp.put_i32_le(self.longitude);
15138        __tmp.put_i32_le(self.altitude);
15139        if matches!(version, MavlinkVersion::V2) {
15140            __tmp.put_u64_le(self.time_usec);
15141            let len = __tmp.len();
15142            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15143        } else {
15144            __tmp.len()
15145        }
15146    }
15147}
15148#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
15149#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
15150#[doc = ""]
15151#[doc = "ID: 123"]
15152#[derive(Debug, Clone, PartialEq)]
15153#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15155#[cfg_attr(feature = "ts", derive(TS))]
15156#[cfg_attr(feature = "ts", ts(export))]
15157pub struct GPS_INJECT_DATA_DATA {
15158    #[doc = "System ID"]
15159    pub target_system: u8,
15160    #[doc = "Component ID"]
15161    pub target_component: u8,
15162    #[doc = "Data length"]
15163    pub len: u8,
15164    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
15165    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15166    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15167    pub data: [u8; 110],
15168}
15169impl GPS_INJECT_DATA_DATA {
15170    pub const ENCODED_LEN: usize = 113usize;
15171    pub const DEFAULT: Self = Self {
15172        target_system: 0_u8,
15173        target_component: 0_u8,
15174        len: 0_u8,
15175        data: [0_u8; 110usize],
15176    };
15177    #[cfg(feature = "arbitrary")]
15178    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15179        use arbitrary::{Arbitrary, Unstructured};
15180        let mut buf = [0u8; 1024];
15181        rng.fill_bytes(&mut buf);
15182        let mut unstructured = Unstructured::new(&buf);
15183        Self::arbitrary(&mut unstructured).unwrap_or_default()
15184    }
15185}
15186impl Default for GPS_INJECT_DATA_DATA {
15187    fn default() -> Self {
15188        Self::DEFAULT.clone()
15189    }
15190}
15191impl MessageData for GPS_INJECT_DATA_DATA {
15192    type Message = MavMessage;
15193    const ID: u32 = 123u32;
15194    const NAME: &'static str = "GPS_INJECT_DATA";
15195    const EXTRA_CRC: u8 = 250u8;
15196    const ENCODED_LEN: usize = 113usize;
15197    fn deser(
15198        _version: MavlinkVersion,
15199        __input: &[u8],
15200    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15201        let avail_len = __input.len();
15202        let mut payload_buf = [0; Self::ENCODED_LEN];
15203        let mut buf = if avail_len < Self::ENCODED_LEN {
15204            payload_buf[0..avail_len].copy_from_slice(__input);
15205            Bytes::new(&payload_buf)
15206        } else {
15207            Bytes::new(__input)
15208        };
15209        let mut __struct = Self::default();
15210        __struct.target_system = buf.get_u8();
15211        __struct.target_component = buf.get_u8();
15212        __struct.len = buf.get_u8();
15213        for v in &mut __struct.data {
15214            let val = buf.get_u8();
15215            *v = val;
15216        }
15217        Ok(__struct)
15218    }
15219    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15220        let mut __tmp = BytesMut::new(bytes);
15221        #[allow(clippy::absurd_extreme_comparisons)]
15222        #[allow(unused_comparisons)]
15223        if __tmp.remaining() < Self::ENCODED_LEN {
15224            panic!(
15225                "buffer is too small (need {} bytes, but got {})",
15226                Self::ENCODED_LEN,
15227                __tmp.remaining(),
15228            )
15229        }
15230        __tmp.put_u8(self.target_system);
15231        __tmp.put_u8(self.target_component);
15232        __tmp.put_u8(self.len);
15233        for val in &self.data {
15234            __tmp.put_u8(*val);
15235        }
15236        if matches!(version, MavlinkVersion::V2) {
15237            let len = __tmp.len();
15238            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15239        } else {
15240            __tmp.len()
15241        }
15242    }
15243}
15244#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
15245#[doc = ""]
15246#[doc = "ID: 232"]
15247#[derive(Debug, Clone, PartialEq)]
15248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15250#[cfg_attr(feature = "ts", derive(TS))]
15251#[cfg_attr(feature = "ts", ts(export))]
15252pub struct GPS_INPUT_DATA {
15253    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15254    pub time_usec: u64,
15255    #[doc = "GPS time (from start of GPS week)"]
15256    pub time_week_ms: u32,
15257    #[doc = "Latitude (WGS84)"]
15258    pub lat: i32,
15259    #[doc = "Longitude (WGS84)"]
15260    pub lon: i32,
15261    #[doc = "Altitude (MSL). Positive for up."]
15262    pub alt: f32,
15263    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
15264    pub hdop: f32,
15265    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
15266    pub vdop: f32,
15267    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15268    pub vn: f32,
15269    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15270    pub ve: f32,
15271    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15272    pub vd: f32,
15273    #[doc = "GPS speed accuracy"]
15274    pub speed_accuracy: f32,
15275    #[doc = "GPS horizontal accuracy"]
15276    pub horiz_accuracy: f32,
15277    #[doc = "GPS vertical accuracy"]
15278    pub vert_accuracy: f32,
15279    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
15280    pub ignore_flags: GpsInputIgnoreFlags,
15281    #[doc = "GPS week number"]
15282    pub time_week: u16,
15283    #[doc = "ID of the GPS for multiple GPS inputs"]
15284    pub gps_id: u8,
15285    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
15286    pub fix_type: u8,
15287    #[doc = "Number of satellites visible."]
15288    pub satellites_visible: u8,
15289    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15290    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15291    pub yaw: u16,
15292}
15293impl GPS_INPUT_DATA {
15294    pub const ENCODED_LEN: usize = 65usize;
15295    pub const DEFAULT: Self = Self {
15296        time_usec: 0_u64,
15297        time_week_ms: 0_u32,
15298        lat: 0_i32,
15299        lon: 0_i32,
15300        alt: 0.0_f32,
15301        hdop: 0.0_f32,
15302        vdop: 0.0_f32,
15303        vn: 0.0_f32,
15304        ve: 0.0_f32,
15305        vd: 0.0_f32,
15306        speed_accuracy: 0.0_f32,
15307        horiz_accuracy: 0.0_f32,
15308        vert_accuracy: 0.0_f32,
15309        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
15310        time_week: 0_u16,
15311        gps_id: 0_u8,
15312        fix_type: 0_u8,
15313        satellites_visible: 0_u8,
15314        yaw: 0_u16,
15315    };
15316    #[cfg(feature = "arbitrary")]
15317    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15318        use arbitrary::{Arbitrary, Unstructured};
15319        let mut buf = [0u8; 1024];
15320        rng.fill_bytes(&mut buf);
15321        let mut unstructured = Unstructured::new(&buf);
15322        Self::arbitrary(&mut unstructured).unwrap_or_default()
15323    }
15324}
15325impl Default for GPS_INPUT_DATA {
15326    fn default() -> Self {
15327        Self::DEFAULT.clone()
15328    }
15329}
15330impl MessageData for GPS_INPUT_DATA {
15331    type Message = MavMessage;
15332    const ID: u32 = 232u32;
15333    const NAME: &'static str = "GPS_INPUT";
15334    const EXTRA_CRC: u8 = 151u8;
15335    const ENCODED_LEN: usize = 65usize;
15336    fn deser(
15337        _version: MavlinkVersion,
15338        __input: &[u8],
15339    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15340        let avail_len = __input.len();
15341        let mut payload_buf = [0; Self::ENCODED_LEN];
15342        let mut buf = if avail_len < Self::ENCODED_LEN {
15343            payload_buf[0..avail_len].copy_from_slice(__input);
15344            Bytes::new(&payload_buf)
15345        } else {
15346            Bytes::new(__input)
15347        };
15348        let mut __struct = Self::default();
15349        __struct.time_usec = buf.get_u64_le();
15350        __struct.time_week_ms = buf.get_u32_le();
15351        __struct.lat = buf.get_i32_le();
15352        __struct.lon = buf.get_i32_le();
15353        __struct.alt = buf.get_f32_le();
15354        __struct.hdop = buf.get_f32_le();
15355        __struct.vdop = buf.get_f32_le();
15356        __struct.vn = buf.get_f32_le();
15357        __struct.ve = buf.get_f32_le();
15358        __struct.vd = buf.get_f32_le();
15359        __struct.speed_accuracy = buf.get_f32_le();
15360        __struct.horiz_accuracy = buf.get_f32_le();
15361        __struct.vert_accuracy = buf.get_f32_le();
15362        let tmp = buf.get_u16_le();
15363        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
15364            tmp as <GpsInputIgnoreFlags as Flags>::Bits,
15365        )
15366        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15367            flag_type: "GpsInputIgnoreFlags",
15368            value: tmp as u64,
15369        })?;
15370        __struct.time_week = buf.get_u16_le();
15371        __struct.gps_id = buf.get_u8();
15372        __struct.fix_type = buf.get_u8();
15373        __struct.satellites_visible = buf.get_u8();
15374        __struct.yaw = buf.get_u16_le();
15375        Ok(__struct)
15376    }
15377    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15378        let mut __tmp = BytesMut::new(bytes);
15379        #[allow(clippy::absurd_extreme_comparisons)]
15380        #[allow(unused_comparisons)]
15381        if __tmp.remaining() < Self::ENCODED_LEN {
15382            panic!(
15383                "buffer is too small (need {} bytes, but got {})",
15384                Self::ENCODED_LEN,
15385                __tmp.remaining(),
15386            )
15387        }
15388        __tmp.put_u64_le(self.time_usec);
15389        __tmp.put_u32_le(self.time_week_ms);
15390        __tmp.put_i32_le(self.lat);
15391        __tmp.put_i32_le(self.lon);
15392        __tmp.put_f32_le(self.alt);
15393        __tmp.put_f32_le(self.hdop);
15394        __tmp.put_f32_le(self.vdop);
15395        __tmp.put_f32_le(self.vn);
15396        __tmp.put_f32_le(self.ve);
15397        __tmp.put_f32_le(self.vd);
15398        __tmp.put_f32_le(self.speed_accuracy);
15399        __tmp.put_f32_le(self.horiz_accuracy);
15400        __tmp.put_f32_le(self.vert_accuracy);
15401        __tmp.put_u16_le(self.ignore_flags.bits() as u16);
15402        __tmp.put_u16_le(self.time_week);
15403        __tmp.put_u8(self.gps_id);
15404        __tmp.put_u8(self.fix_type);
15405        __tmp.put_u8(self.satellites_visible);
15406        if matches!(version, MavlinkVersion::V2) {
15407            __tmp.put_u16_le(self.yaw);
15408            let len = __tmp.len();
15409            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15410        } else {
15411            __tmp.len()
15412        }
15413    }
15414}
15415#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15416#[doc = ""]
15417#[doc = "ID: 24"]
15418#[derive(Debug, Clone, PartialEq)]
15419#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15421#[cfg_attr(feature = "ts", derive(TS))]
15422#[cfg_attr(feature = "ts", ts(export))]
15423pub struct GPS_RAW_INT_DATA {
15424    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15425    pub time_usec: u64,
15426    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
15427    pub lat: i32,
15428    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
15429    pub lon: i32,
15430    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
15431    pub alt: i32,
15432    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15433    pub eph: u16,
15434    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15435    pub epv: u16,
15436    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15437    pub vel: u16,
15438    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15439    pub cog: u16,
15440    #[doc = "GPS fix type."]
15441    pub fix_type: GpsFixType,
15442    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15443    pub satellites_visible: u8,
15444    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
15445    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15446    pub alt_ellipsoid: i32,
15447    #[doc = "Position uncertainty."]
15448    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15449    pub h_acc: u32,
15450    #[doc = "Altitude uncertainty."]
15451    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15452    pub v_acc: u32,
15453    #[doc = "Speed uncertainty."]
15454    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15455    pub vel_acc: u32,
15456    #[doc = "Heading / track uncertainty"]
15457    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15458    pub hdg_acc: u32,
15459    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
15460    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15461    pub yaw: u16,
15462}
15463impl GPS_RAW_INT_DATA {
15464    pub const ENCODED_LEN: usize = 52usize;
15465    pub const DEFAULT: Self = Self {
15466        time_usec: 0_u64,
15467        lat: 0_i32,
15468        lon: 0_i32,
15469        alt: 0_i32,
15470        eph: 0_u16,
15471        epv: 0_u16,
15472        vel: 0_u16,
15473        cog: 0_u16,
15474        fix_type: GpsFixType::DEFAULT,
15475        satellites_visible: 0_u8,
15476        alt_ellipsoid: 0_i32,
15477        h_acc: 0_u32,
15478        v_acc: 0_u32,
15479        vel_acc: 0_u32,
15480        hdg_acc: 0_u32,
15481        yaw: 0_u16,
15482    };
15483    #[cfg(feature = "arbitrary")]
15484    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15485        use arbitrary::{Arbitrary, Unstructured};
15486        let mut buf = [0u8; 1024];
15487        rng.fill_bytes(&mut buf);
15488        let mut unstructured = Unstructured::new(&buf);
15489        Self::arbitrary(&mut unstructured).unwrap_or_default()
15490    }
15491}
15492impl Default for GPS_RAW_INT_DATA {
15493    fn default() -> Self {
15494        Self::DEFAULT.clone()
15495    }
15496}
15497impl MessageData for GPS_RAW_INT_DATA {
15498    type Message = MavMessage;
15499    const ID: u32 = 24u32;
15500    const NAME: &'static str = "GPS_RAW_INT";
15501    const EXTRA_CRC: u8 = 24u8;
15502    const ENCODED_LEN: usize = 52usize;
15503    fn deser(
15504        _version: MavlinkVersion,
15505        __input: &[u8],
15506    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15507        let avail_len = __input.len();
15508        let mut payload_buf = [0; Self::ENCODED_LEN];
15509        let mut buf = if avail_len < Self::ENCODED_LEN {
15510            payload_buf[0..avail_len].copy_from_slice(__input);
15511            Bytes::new(&payload_buf)
15512        } else {
15513            Bytes::new(__input)
15514        };
15515        let mut __struct = Self::default();
15516        __struct.time_usec = buf.get_u64_le();
15517        __struct.lat = buf.get_i32_le();
15518        __struct.lon = buf.get_i32_le();
15519        __struct.alt = buf.get_i32_le();
15520        __struct.eph = buf.get_u16_le();
15521        __struct.epv = buf.get_u16_le();
15522        __struct.vel = buf.get_u16_le();
15523        __struct.cog = buf.get_u16_le();
15524        let tmp = buf.get_u8();
15525        __struct.fix_type =
15526            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15527                enum_type: "GpsFixType",
15528                value: tmp as u64,
15529            })?;
15530        __struct.satellites_visible = buf.get_u8();
15531        __struct.alt_ellipsoid = buf.get_i32_le();
15532        __struct.h_acc = buf.get_u32_le();
15533        __struct.v_acc = buf.get_u32_le();
15534        __struct.vel_acc = buf.get_u32_le();
15535        __struct.hdg_acc = buf.get_u32_le();
15536        __struct.yaw = buf.get_u16_le();
15537        Ok(__struct)
15538    }
15539    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15540        let mut __tmp = BytesMut::new(bytes);
15541        #[allow(clippy::absurd_extreme_comparisons)]
15542        #[allow(unused_comparisons)]
15543        if __tmp.remaining() < Self::ENCODED_LEN {
15544            panic!(
15545                "buffer is too small (need {} bytes, but got {})",
15546                Self::ENCODED_LEN,
15547                __tmp.remaining(),
15548            )
15549        }
15550        __tmp.put_u64_le(self.time_usec);
15551        __tmp.put_i32_le(self.lat);
15552        __tmp.put_i32_le(self.lon);
15553        __tmp.put_i32_le(self.alt);
15554        __tmp.put_u16_le(self.eph);
15555        __tmp.put_u16_le(self.epv);
15556        __tmp.put_u16_le(self.vel);
15557        __tmp.put_u16_le(self.cog);
15558        __tmp.put_u8(self.fix_type as u8);
15559        __tmp.put_u8(self.satellites_visible);
15560        if matches!(version, MavlinkVersion::V2) {
15561            __tmp.put_i32_le(self.alt_ellipsoid);
15562            __tmp.put_u32_le(self.h_acc);
15563            __tmp.put_u32_le(self.v_acc);
15564            __tmp.put_u32_le(self.vel_acc);
15565            __tmp.put_u32_le(self.hdg_acc);
15566            __tmp.put_u16_le(self.yaw);
15567            let len = __tmp.len();
15568            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15569        } else {
15570            __tmp.len()
15571        }
15572    }
15573}
15574#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
15575#[doc = ""]
15576#[doc = "ID: 233"]
15577#[derive(Debug, Clone, PartialEq)]
15578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15579#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15580#[cfg_attr(feature = "ts", derive(TS))]
15581#[cfg_attr(feature = "ts", ts(export))]
15582pub struct GPS_RTCM_DATA_DATA {
15583    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
15584    pub flags: u8,
15585    #[doc = "data length"]
15586    pub len: u8,
15587    #[doc = "RTCM message (may be fragmented)"]
15588    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15589    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15590    pub data: [u8; 180],
15591}
15592impl GPS_RTCM_DATA_DATA {
15593    pub const ENCODED_LEN: usize = 182usize;
15594    pub const DEFAULT: Self = Self {
15595        flags: 0_u8,
15596        len: 0_u8,
15597        data: [0_u8; 180usize],
15598    };
15599    #[cfg(feature = "arbitrary")]
15600    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15601        use arbitrary::{Arbitrary, Unstructured};
15602        let mut buf = [0u8; 1024];
15603        rng.fill_bytes(&mut buf);
15604        let mut unstructured = Unstructured::new(&buf);
15605        Self::arbitrary(&mut unstructured).unwrap_or_default()
15606    }
15607}
15608impl Default for GPS_RTCM_DATA_DATA {
15609    fn default() -> Self {
15610        Self::DEFAULT.clone()
15611    }
15612}
15613impl MessageData for GPS_RTCM_DATA_DATA {
15614    type Message = MavMessage;
15615    const ID: u32 = 233u32;
15616    const NAME: &'static str = "GPS_RTCM_DATA";
15617    const EXTRA_CRC: u8 = 35u8;
15618    const ENCODED_LEN: usize = 182usize;
15619    fn deser(
15620        _version: MavlinkVersion,
15621        __input: &[u8],
15622    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15623        let avail_len = __input.len();
15624        let mut payload_buf = [0; Self::ENCODED_LEN];
15625        let mut buf = if avail_len < Self::ENCODED_LEN {
15626            payload_buf[0..avail_len].copy_from_slice(__input);
15627            Bytes::new(&payload_buf)
15628        } else {
15629            Bytes::new(__input)
15630        };
15631        let mut __struct = Self::default();
15632        __struct.flags = buf.get_u8();
15633        __struct.len = buf.get_u8();
15634        for v in &mut __struct.data {
15635            let val = buf.get_u8();
15636            *v = val;
15637        }
15638        Ok(__struct)
15639    }
15640    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15641        let mut __tmp = BytesMut::new(bytes);
15642        #[allow(clippy::absurd_extreme_comparisons)]
15643        #[allow(unused_comparisons)]
15644        if __tmp.remaining() < Self::ENCODED_LEN {
15645            panic!(
15646                "buffer is too small (need {} bytes, but got {})",
15647                Self::ENCODED_LEN,
15648                __tmp.remaining(),
15649            )
15650        }
15651        __tmp.put_u8(self.flags);
15652        __tmp.put_u8(self.len);
15653        for val in &self.data {
15654            __tmp.put_u8(*val);
15655        }
15656        if matches!(version, MavlinkVersion::V2) {
15657            let len = __tmp.len();
15658            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15659        } else {
15660            __tmp.len()
15661        }
15662    }
15663}
15664#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
15665#[doc = ""]
15666#[doc = "ID: 127"]
15667#[derive(Debug, Clone, PartialEq)]
15668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15670#[cfg_attr(feature = "ts", derive(TS))]
15671#[cfg_attr(feature = "ts", ts(export))]
15672pub struct GPS_RTK_DATA {
15673    #[doc = "Time since boot of last baseline message received."]
15674    pub time_last_baseline_ms: u32,
15675    #[doc = "GPS Time of Week of last baseline"]
15676    pub tow: u32,
15677    #[doc = "Current baseline in ECEF x or NED north component."]
15678    pub baseline_a_mm: i32,
15679    #[doc = "Current baseline in ECEF y or NED east component."]
15680    pub baseline_b_mm: i32,
15681    #[doc = "Current baseline in ECEF z or NED down component."]
15682    pub baseline_c_mm: i32,
15683    #[doc = "Current estimate of baseline accuracy."]
15684    pub accuracy: u32,
15685    #[doc = "Current number of integer ambiguity hypotheses."]
15686    pub iar_num_hypotheses: i32,
15687    #[doc = "GPS Week Number of last baseline"]
15688    pub wn: u16,
15689    #[doc = "Identification of connected RTK receiver."]
15690    pub rtk_receiver_id: u8,
15691    #[doc = "GPS-specific health report for RTK data."]
15692    pub rtk_health: u8,
15693    #[doc = "Rate of baseline messages being received by GPS"]
15694    pub rtk_rate: u8,
15695    #[doc = "Current number of sats used for RTK calculation."]
15696    pub nsats: u8,
15697    #[doc = "Coordinate system of baseline"]
15698    pub baseline_coords_type: RtkBaselineCoordinateSystem,
15699}
15700impl GPS_RTK_DATA {
15701    pub const ENCODED_LEN: usize = 35usize;
15702    pub const DEFAULT: Self = Self {
15703        time_last_baseline_ms: 0_u32,
15704        tow: 0_u32,
15705        baseline_a_mm: 0_i32,
15706        baseline_b_mm: 0_i32,
15707        baseline_c_mm: 0_i32,
15708        accuracy: 0_u32,
15709        iar_num_hypotheses: 0_i32,
15710        wn: 0_u16,
15711        rtk_receiver_id: 0_u8,
15712        rtk_health: 0_u8,
15713        rtk_rate: 0_u8,
15714        nsats: 0_u8,
15715        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
15716    };
15717    #[cfg(feature = "arbitrary")]
15718    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15719        use arbitrary::{Arbitrary, Unstructured};
15720        let mut buf = [0u8; 1024];
15721        rng.fill_bytes(&mut buf);
15722        let mut unstructured = Unstructured::new(&buf);
15723        Self::arbitrary(&mut unstructured).unwrap_or_default()
15724    }
15725}
15726impl Default for GPS_RTK_DATA {
15727    fn default() -> Self {
15728        Self::DEFAULT.clone()
15729    }
15730}
15731impl MessageData for GPS_RTK_DATA {
15732    type Message = MavMessage;
15733    const ID: u32 = 127u32;
15734    const NAME: &'static str = "GPS_RTK";
15735    const EXTRA_CRC: u8 = 25u8;
15736    const ENCODED_LEN: usize = 35usize;
15737    fn deser(
15738        _version: MavlinkVersion,
15739        __input: &[u8],
15740    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15741        let avail_len = __input.len();
15742        let mut payload_buf = [0; Self::ENCODED_LEN];
15743        let mut buf = if avail_len < Self::ENCODED_LEN {
15744            payload_buf[0..avail_len].copy_from_slice(__input);
15745            Bytes::new(&payload_buf)
15746        } else {
15747            Bytes::new(__input)
15748        };
15749        let mut __struct = Self::default();
15750        __struct.time_last_baseline_ms = buf.get_u32_le();
15751        __struct.tow = buf.get_u32_le();
15752        __struct.baseline_a_mm = buf.get_i32_le();
15753        __struct.baseline_b_mm = buf.get_i32_le();
15754        __struct.baseline_c_mm = buf.get_i32_le();
15755        __struct.accuracy = buf.get_u32_le();
15756        __struct.iar_num_hypotheses = buf.get_i32_le();
15757        __struct.wn = buf.get_u16_le();
15758        __struct.rtk_receiver_id = buf.get_u8();
15759        __struct.rtk_health = buf.get_u8();
15760        __struct.rtk_rate = buf.get_u8();
15761        __struct.nsats = buf.get_u8();
15762        let tmp = buf.get_u8();
15763        __struct.baseline_coords_type =
15764            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15765                enum_type: "RtkBaselineCoordinateSystem",
15766                value: tmp as u64,
15767            })?;
15768        Ok(__struct)
15769    }
15770    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15771        let mut __tmp = BytesMut::new(bytes);
15772        #[allow(clippy::absurd_extreme_comparisons)]
15773        #[allow(unused_comparisons)]
15774        if __tmp.remaining() < Self::ENCODED_LEN {
15775            panic!(
15776                "buffer is too small (need {} bytes, but got {})",
15777                Self::ENCODED_LEN,
15778                __tmp.remaining(),
15779            )
15780        }
15781        __tmp.put_u32_le(self.time_last_baseline_ms);
15782        __tmp.put_u32_le(self.tow);
15783        __tmp.put_i32_le(self.baseline_a_mm);
15784        __tmp.put_i32_le(self.baseline_b_mm);
15785        __tmp.put_i32_le(self.baseline_c_mm);
15786        __tmp.put_u32_le(self.accuracy);
15787        __tmp.put_i32_le(self.iar_num_hypotheses);
15788        __tmp.put_u16_le(self.wn);
15789        __tmp.put_u8(self.rtk_receiver_id);
15790        __tmp.put_u8(self.rtk_health);
15791        __tmp.put_u8(self.rtk_rate);
15792        __tmp.put_u8(self.nsats);
15793        __tmp.put_u8(self.baseline_coords_type as u8);
15794        if matches!(version, MavlinkVersion::V2) {
15795            let len = __tmp.len();
15796            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15797        } else {
15798            __tmp.len()
15799        }
15800    }
15801}
15802#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
15803#[doc = ""]
15804#[doc = "ID: 25"]
15805#[derive(Debug, Clone, PartialEq)]
15806#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15807#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15808#[cfg_attr(feature = "ts", derive(TS))]
15809#[cfg_attr(feature = "ts", ts(export))]
15810pub struct GPS_STATUS_DATA {
15811    #[doc = "Number of satellites visible"]
15812    pub satellites_visible: u8,
15813    #[doc = "Global satellite ID"]
15814    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15815    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15816    pub satellite_prn: [u8; 20],
15817    #[doc = "0: Satellite not used, 1: used for localization"]
15818    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15819    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15820    pub satellite_used: [u8; 20],
15821    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
15822    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15823    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15824    pub satellite_elevation: [u8; 20],
15825    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
15826    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15827    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15828    pub satellite_azimuth: [u8; 20],
15829    #[doc = "Signal to noise ratio of satellite"]
15830    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15831    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15832    pub satellite_snr: [u8; 20],
15833}
15834impl GPS_STATUS_DATA {
15835    pub const ENCODED_LEN: usize = 101usize;
15836    pub const DEFAULT: Self = Self {
15837        satellites_visible: 0_u8,
15838        satellite_prn: [0_u8; 20usize],
15839        satellite_used: [0_u8; 20usize],
15840        satellite_elevation: [0_u8; 20usize],
15841        satellite_azimuth: [0_u8; 20usize],
15842        satellite_snr: [0_u8; 20usize],
15843    };
15844    #[cfg(feature = "arbitrary")]
15845    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15846        use arbitrary::{Arbitrary, Unstructured};
15847        let mut buf = [0u8; 1024];
15848        rng.fill_bytes(&mut buf);
15849        let mut unstructured = Unstructured::new(&buf);
15850        Self::arbitrary(&mut unstructured).unwrap_or_default()
15851    }
15852}
15853impl Default for GPS_STATUS_DATA {
15854    fn default() -> Self {
15855        Self::DEFAULT.clone()
15856    }
15857}
15858impl MessageData for GPS_STATUS_DATA {
15859    type Message = MavMessage;
15860    const ID: u32 = 25u32;
15861    const NAME: &'static str = "GPS_STATUS";
15862    const EXTRA_CRC: u8 = 23u8;
15863    const ENCODED_LEN: usize = 101usize;
15864    fn deser(
15865        _version: MavlinkVersion,
15866        __input: &[u8],
15867    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15868        let avail_len = __input.len();
15869        let mut payload_buf = [0; Self::ENCODED_LEN];
15870        let mut buf = if avail_len < Self::ENCODED_LEN {
15871            payload_buf[0..avail_len].copy_from_slice(__input);
15872            Bytes::new(&payload_buf)
15873        } else {
15874            Bytes::new(__input)
15875        };
15876        let mut __struct = Self::default();
15877        __struct.satellites_visible = buf.get_u8();
15878        for v in &mut __struct.satellite_prn {
15879            let val = buf.get_u8();
15880            *v = val;
15881        }
15882        for v in &mut __struct.satellite_used {
15883            let val = buf.get_u8();
15884            *v = val;
15885        }
15886        for v in &mut __struct.satellite_elevation {
15887            let val = buf.get_u8();
15888            *v = val;
15889        }
15890        for v in &mut __struct.satellite_azimuth {
15891            let val = buf.get_u8();
15892            *v = val;
15893        }
15894        for v in &mut __struct.satellite_snr {
15895            let val = buf.get_u8();
15896            *v = val;
15897        }
15898        Ok(__struct)
15899    }
15900    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15901        let mut __tmp = BytesMut::new(bytes);
15902        #[allow(clippy::absurd_extreme_comparisons)]
15903        #[allow(unused_comparisons)]
15904        if __tmp.remaining() < Self::ENCODED_LEN {
15905            panic!(
15906                "buffer is too small (need {} bytes, but got {})",
15907                Self::ENCODED_LEN,
15908                __tmp.remaining(),
15909            )
15910        }
15911        __tmp.put_u8(self.satellites_visible);
15912        for val in &self.satellite_prn {
15913            __tmp.put_u8(*val);
15914        }
15915        for val in &self.satellite_used {
15916            __tmp.put_u8(*val);
15917        }
15918        for val in &self.satellite_elevation {
15919            __tmp.put_u8(*val);
15920        }
15921        for val in &self.satellite_azimuth {
15922            __tmp.put_u8(*val);
15923        }
15924        for val in &self.satellite_snr {
15925            __tmp.put_u8(*val);
15926        }
15927        if matches!(version, MavlinkVersion::V2) {
15928            let len = __tmp.len();
15929            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15930        } else {
15931            __tmp.len()
15932        }
15933    }
15934}
15935#[doc = "Status of GSM modem (connected to onboard computer)."]
15936#[doc = ""]
15937#[doc = "ID: 8014"]
15938#[derive(Debug, Clone, PartialEq)]
15939#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15941#[cfg_attr(feature = "ts", derive(TS))]
15942#[cfg_attr(feature = "ts", ts(export))]
15943pub struct GSM_LINK_STATUS_DATA {
15944    #[doc = "Timestamp (of OBC)"]
15945    pub timestamp: u64,
15946    #[doc = "GSM modem used"]
15947    pub gsm_modem_type: GsmModemType,
15948    #[doc = "GSM link type"]
15949    pub gsm_link_type: GsmLinkType,
15950    #[doc = "RSSI as reported by modem (unconverted)"]
15951    pub rssi: u8,
15952    #[doc = "RSRP (LTE) or RSCP (WCDMA) as reported by modem (unconverted)"]
15953    pub rsrp_rscp: u8,
15954    #[doc = "SINR (LTE) or ECIO (WCDMA) as reported by modem (unconverted)"]
15955    pub sinr_ecio: u8,
15956    #[doc = "RSRQ (LTE only) as reported by modem (unconverted)"]
15957    pub rsrq: u8,
15958}
15959impl GSM_LINK_STATUS_DATA {
15960    pub const ENCODED_LEN: usize = 14usize;
15961    pub const DEFAULT: Self = Self {
15962        timestamp: 0_u64,
15963        gsm_modem_type: GsmModemType::DEFAULT,
15964        gsm_link_type: GsmLinkType::DEFAULT,
15965        rssi: 0_u8,
15966        rsrp_rscp: 0_u8,
15967        sinr_ecio: 0_u8,
15968        rsrq: 0_u8,
15969    };
15970    #[cfg(feature = "arbitrary")]
15971    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15972        use arbitrary::{Arbitrary, Unstructured};
15973        let mut buf = [0u8; 1024];
15974        rng.fill_bytes(&mut buf);
15975        let mut unstructured = Unstructured::new(&buf);
15976        Self::arbitrary(&mut unstructured).unwrap_or_default()
15977    }
15978}
15979impl Default for GSM_LINK_STATUS_DATA {
15980    fn default() -> Self {
15981        Self::DEFAULT.clone()
15982    }
15983}
15984impl MessageData for GSM_LINK_STATUS_DATA {
15985    type Message = MavMessage;
15986    const ID: u32 = 8014u32;
15987    const NAME: &'static str = "GSM_LINK_STATUS";
15988    const EXTRA_CRC: u8 = 200u8;
15989    const ENCODED_LEN: usize = 14usize;
15990    fn deser(
15991        _version: MavlinkVersion,
15992        __input: &[u8],
15993    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15994        let avail_len = __input.len();
15995        let mut payload_buf = [0; Self::ENCODED_LEN];
15996        let mut buf = if avail_len < Self::ENCODED_LEN {
15997            payload_buf[0..avail_len].copy_from_slice(__input);
15998            Bytes::new(&payload_buf)
15999        } else {
16000            Bytes::new(__input)
16001        };
16002        let mut __struct = Self::default();
16003        __struct.timestamp = buf.get_u64_le();
16004        let tmp = buf.get_u8();
16005        __struct.gsm_modem_type =
16006            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16007                enum_type: "GsmModemType",
16008                value: tmp as u64,
16009            })?;
16010        let tmp = buf.get_u8();
16011        __struct.gsm_link_type =
16012            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16013                enum_type: "GsmLinkType",
16014                value: tmp as u64,
16015            })?;
16016        __struct.rssi = buf.get_u8();
16017        __struct.rsrp_rscp = buf.get_u8();
16018        __struct.sinr_ecio = buf.get_u8();
16019        __struct.rsrq = buf.get_u8();
16020        Ok(__struct)
16021    }
16022    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16023        let mut __tmp = BytesMut::new(bytes);
16024        #[allow(clippy::absurd_extreme_comparisons)]
16025        #[allow(unused_comparisons)]
16026        if __tmp.remaining() < Self::ENCODED_LEN {
16027            panic!(
16028                "buffer is too small (need {} bytes, but got {})",
16029                Self::ENCODED_LEN,
16030                __tmp.remaining(),
16031            )
16032        }
16033        __tmp.put_u64_le(self.timestamp);
16034        __tmp.put_u8(self.gsm_modem_type as u8);
16035        __tmp.put_u8(self.gsm_link_type as u8);
16036        __tmp.put_u8(self.rssi);
16037        __tmp.put_u8(self.rsrp_rscp);
16038        __tmp.put_u8(self.sinr_ecio);
16039        __tmp.put_u8(self.rsrq);
16040        if matches!(version, MavlinkVersion::V2) {
16041            let len = __tmp.len();
16042            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16043        } else {
16044            __tmp.len()
16045        }
16046    }
16047}
16048#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
16049#[doc = ""]
16050#[doc = "ID: 0"]
16051#[derive(Debug, Clone, PartialEq)]
16052#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16054#[cfg_attr(feature = "ts", derive(TS))]
16055#[cfg_attr(feature = "ts", ts(export))]
16056pub struct HEARTBEAT_DATA {
16057    #[doc = "A bitfield for use for autopilot-specific flags"]
16058    pub custom_mode: u32,
16059    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
16060    pub mavtype: MavType,
16061    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
16062    pub autopilot: MavAutopilot,
16063    #[doc = "System mode bitmap."]
16064    pub base_mode: MavModeFlag,
16065    #[doc = "System status flag."]
16066    pub system_status: MavState,
16067    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
16068    pub mavlink_version: u8,
16069}
16070impl HEARTBEAT_DATA {
16071    pub const ENCODED_LEN: usize = 9usize;
16072    pub const DEFAULT: Self = Self {
16073        custom_mode: 0_u32,
16074        mavtype: MavType::DEFAULT,
16075        autopilot: MavAutopilot::DEFAULT,
16076        base_mode: MavModeFlag::DEFAULT,
16077        system_status: MavState::DEFAULT,
16078        mavlink_version: MINOR_MAVLINK_VERSION,
16079    };
16080    #[cfg(feature = "arbitrary")]
16081    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16082        use arbitrary::{Arbitrary, Unstructured};
16083        let mut buf = [0u8; 1024];
16084        rng.fill_bytes(&mut buf);
16085        let mut unstructured = Unstructured::new(&buf);
16086        Self::arbitrary(&mut unstructured).unwrap_or_default()
16087    }
16088}
16089impl Default for HEARTBEAT_DATA {
16090    fn default() -> Self {
16091        Self::DEFAULT.clone()
16092    }
16093}
16094impl MessageData for HEARTBEAT_DATA {
16095    type Message = MavMessage;
16096    const ID: u32 = 0u32;
16097    const NAME: &'static str = "HEARTBEAT";
16098    const EXTRA_CRC: u8 = 50u8;
16099    const ENCODED_LEN: usize = 9usize;
16100    fn deser(
16101        _version: MavlinkVersion,
16102        __input: &[u8],
16103    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16104        let avail_len = __input.len();
16105        let mut payload_buf = [0; Self::ENCODED_LEN];
16106        let mut buf = if avail_len < Self::ENCODED_LEN {
16107            payload_buf[0..avail_len].copy_from_slice(__input);
16108            Bytes::new(&payload_buf)
16109        } else {
16110            Bytes::new(__input)
16111        };
16112        let mut __struct = Self::default();
16113        __struct.custom_mode = buf.get_u32_le();
16114        let tmp = buf.get_u8();
16115        __struct.mavtype =
16116            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16117                enum_type: "MavType",
16118                value: tmp as u64,
16119            })?;
16120        let tmp = buf.get_u8();
16121        __struct.autopilot =
16122            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16123                enum_type: "MavAutopilot",
16124                value: tmp as u64,
16125            })?;
16126        let tmp = buf.get_u8();
16127        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
16128            ::mavlink_core::error::ParserError::InvalidFlag {
16129                flag_type: "MavModeFlag",
16130                value: tmp as u64,
16131            },
16132        )?;
16133        let tmp = buf.get_u8();
16134        __struct.system_status =
16135            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16136                enum_type: "MavState",
16137                value: tmp as u64,
16138            })?;
16139        __struct.mavlink_version = buf.get_u8();
16140        Ok(__struct)
16141    }
16142    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16143        let mut __tmp = BytesMut::new(bytes);
16144        #[allow(clippy::absurd_extreme_comparisons)]
16145        #[allow(unused_comparisons)]
16146        if __tmp.remaining() < Self::ENCODED_LEN {
16147            panic!(
16148                "buffer is too small (need {} bytes, but got {})",
16149                Self::ENCODED_LEN,
16150                __tmp.remaining(),
16151            )
16152        }
16153        __tmp.put_u32_le(self.custom_mode);
16154        __tmp.put_u8(self.mavtype as u8);
16155        __tmp.put_u8(self.autopilot as u8);
16156        __tmp.put_u8(self.base_mode.bits() as u8);
16157        __tmp.put_u8(self.system_status as u8);
16158        __tmp.put_u8(self.mavlink_version);
16159        if matches!(version, MavlinkVersion::V2) {
16160            let len = __tmp.len();
16161            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16162        } else {
16163            __tmp.len()
16164        }
16165    }
16166}
16167#[doc = "The IMU readings in SI units in NED body frame."]
16168#[doc = ""]
16169#[doc = "ID: 105"]
16170#[derive(Debug, Clone, PartialEq)]
16171#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16172#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16173#[cfg_attr(feature = "ts", derive(TS))]
16174#[cfg_attr(feature = "ts", ts(export))]
16175pub struct HIGHRES_IMU_DATA {
16176    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16177    pub time_usec: u64,
16178    #[doc = "X acceleration"]
16179    pub xacc: f32,
16180    #[doc = "Y acceleration"]
16181    pub yacc: f32,
16182    #[doc = "Z acceleration"]
16183    pub zacc: f32,
16184    #[doc = "Angular speed around X axis"]
16185    pub xgyro: f32,
16186    #[doc = "Angular speed around Y axis"]
16187    pub ygyro: f32,
16188    #[doc = "Angular speed around Z axis"]
16189    pub zgyro: f32,
16190    #[doc = "X Magnetic field"]
16191    pub xmag: f32,
16192    #[doc = "Y Magnetic field"]
16193    pub ymag: f32,
16194    #[doc = "Z Magnetic field"]
16195    pub zmag: f32,
16196    #[doc = "Absolute pressure"]
16197    pub abs_pressure: f32,
16198    #[doc = "Differential pressure"]
16199    pub diff_pressure: f32,
16200    #[doc = "Altitude calculated from pressure"]
16201    pub pressure_alt: f32,
16202    #[doc = "Temperature"]
16203    pub temperature: f32,
16204    #[doc = "Bitmap for fields that have updated since last message"]
16205    pub fields_updated: HighresImuUpdatedFlags,
16206    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
16207    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16208    pub id: u8,
16209}
16210impl HIGHRES_IMU_DATA {
16211    pub const ENCODED_LEN: usize = 63usize;
16212    pub const DEFAULT: Self = Self {
16213        time_usec: 0_u64,
16214        xacc: 0.0_f32,
16215        yacc: 0.0_f32,
16216        zacc: 0.0_f32,
16217        xgyro: 0.0_f32,
16218        ygyro: 0.0_f32,
16219        zgyro: 0.0_f32,
16220        xmag: 0.0_f32,
16221        ymag: 0.0_f32,
16222        zmag: 0.0_f32,
16223        abs_pressure: 0.0_f32,
16224        diff_pressure: 0.0_f32,
16225        pressure_alt: 0.0_f32,
16226        temperature: 0.0_f32,
16227        fields_updated: HighresImuUpdatedFlags::DEFAULT,
16228        id: 0_u8,
16229    };
16230    #[cfg(feature = "arbitrary")]
16231    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16232        use arbitrary::{Arbitrary, Unstructured};
16233        let mut buf = [0u8; 1024];
16234        rng.fill_bytes(&mut buf);
16235        let mut unstructured = Unstructured::new(&buf);
16236        Self::arbitrary(&mut unstructured).unwrap_or_default()
16237    }
16238}
16239impl Default for HIGHRES_IMU_DATA {
16240    fn default() -> Self {
16241        Self::DEFAULT.clone()
16242    }
16243}
16244impl MessageData for HIGHRES_IMU_DATA {
16245    type Message = MavMessage;
16246    const ID: u32 = 105u32;
16247    const NAME: &'static str = "HIGHRES_IMU";
16248    const EXTRA_CRC: u8 = 93u8;
16249    const ENCODED_LEN: usize = 63usize;
16250    fn deser(
16251        _version: MavlinkVersion,
16252        __input: &[u8],
16253    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16254        let avail_len = __input.len();
16255        let mut payload_buf = [0; Self::ENCODED_LEN];
16256        let mut buf = if avail_len < Self::ENCODED_LEN {
16257            payload_buf[0..avail_len].copy_from_slice(__input);
16258            Bytes::new(&payload_buf)
16259        } else {
16260            Bytes::new(__input)
16261        };
16262        let mut __struct = Self::default();
16263        __struct.time_usec = buf.get_u64_le();
16264        __struct.xacc = buf.get_f32_le();
16265        __struct.yacc = buf.get_f32_le();
16266        __struct.zacc = buf.get_f32_le();
16267        __struct.xgyro = buf.get_f32_le();
16268        __struct.ygyro = buf.get_f32_le();
16269        __struct.zgyro = buf.get_f32_le();
16270        __struct.xmag = buf.get_f32_le();
16271        __struct.ymag = buf.get_f32_le();
16272        __struct.zmag = buf.get_f32_le();
16273        __struct.abs_pressure = buf.get_f32_le();
16274        __struct.diff_pressure = buf.get_f32_le();
16275        __struct.pressure_alt = buf.get_f32_le();
16276        __struct.temperature = buf.get_f32_le();
16277        let tmp = buf.get_u16_le();
16278        __struct.fields_updated =
16279            HighresImuUpdatedFlags::from_bits(tmp as <HighresImuUpdatedFlags as Flags>::Bits)
16280                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16281                    flag_type: "HighresImuUpdatedFlags",
16282                    value: tmp as u64,
16283                })?;
16284        __struct.id = buf.get_u8();
16285        Ok(__struct)
16286    }
16287    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16288        let mut __tmp = BytesMut::new(bytes);
16289        #[allow(clippy::absurd_extreme_comparisons)]
16290        #[allow(unused_comparisons)]
16291        if __tmp.remaining() < Self::ENCODED_LEN {
16292            panic!(
16293                "buffer is too small (need {} bytes, but got {})",
16294                Self::ENCODED_LEN,
16295                __tmp.remaining(),
16296            )
16297        }
16298        __tmp.put_u64_le(self.time_usec);
16299        __tmp.put_f32_le(self.xacc);
16300        __tmp.put_f32_le(self.yacc);
16301        __tmp.put_f32_le(self.zacc);
16302        __tmp.put_f32_le(self.xgyro);
16303        __tmp.put_f32_le(self.ygyro);
16304        __tmp.put_f32_le(self.zgyro);
16305        __tmp.put_f32_le(self.xmag);
16306        __tmp.put_f32_le(self.ymag);
16307        __tmp.put_f32_le(self.zmag);
16308        __tmp.put_f32_le(self.abs_pressure);
16309        __tmp.put_f32_le(self.diff_pressure);
16310        __tmp.put_f32_le(self.pressure_alt);
16311        __tmp.put_f32_le(self.temperature);
16312        __tmp.put_u16_le(self.fields_updated.bits() as u16);
16313        if matches!(version, MavlinkVersion::V2) {
16314            __tmp.put_u8(self.id);
16315            let len = __tmp.len();
16316            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16317        } else {
16318            __tmp.len()
16319        }
16320    }
16321}
16322#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
16323#[doc = "Message appropriate for high latency connections like Iridium."]
16324#[doc = ""]
16325#[doc = "ID: 234"]
16326#[derive(Debug, Clone, PartialEq)]
16327#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16328#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16329#[cfg_attr(feature = "ts", derive(TS))]
16330#[cfg_attr(feature = "ts", ts(export))]
16331pub struct HIGH_LATENCY_DATA {
16332    #[doc = "A bitfield for use for autopilot-specific flags."]
16333    pub custom_mode: u32,
16334    #[doc = "Latitude"]
16335    pub latitude: i32,
16336    #[doc = "Longitude"]
16337    pub longitude: i32,
16338    #[doc = "roll"]
16339    pub roll: i16,
16340    #[doc = "pitch"]
16341    pub pitch: i16,
16342    #[doc = "heading"]
16343    pub heading: u16,
16344    #[doc = "heading setpoint"]
16345    pub heading_sp: i16,
16346    #[doc = "Altitude above mean sea level"]
16347    pub altitude_amsl: i16,
16348    #[doc = "Altitude setpoint relative to the home position"]
16349    pub altitude_sp: i16,
16350    #[doc = "distance to target"]
16351    pub wp_distance: u16,
16352    #[doc = "Bitmap of enabled system modes."]
16353    pub base_mode: MavModeFlag,
16354    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
16355    pub landed_state: MavLandedState,
16356    #[doc = "throttle (percentage)"]
16357    pub throttle: i8,
16358    #[doc = "airspeed"]
16359    pub airspeed: u8,
16360    #[doc = "airspeed setpoint"]
16361    pub airspeed_sp: u8,
16362    #[doc = "groundspeed"]
16363    pub groundspeed: u8,
16364    #[doc = "climb rate"]
16365    pub climb_rate: i8,
16366    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16367    pub gps_nsat: u8,
16368    #[doc = "GPS Fix type."]
16369    pub gps_fix_type: GpsFixType,
16370    #[doc = "Remaining battery (percentage)"]
16371    pub battery_remaining: u8,
16372    #[doc = "Autopilot temperature (degrees C)"]
16373    pub temperature: i8,
16374    #[doc = "Air temperature (degrees C) from airspeed sensor"]
16375    pub temperature_air: i8,
16376    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
16377    pub failsafe: u8,
16378    #[doc = "current waypoint number"]
16379    pub wp_num: u8,
16380}
16381impl HIGH_LATENCY_DATA {
16382    pub const ENCODED_LEN: usize = 40usize;
16383    pub const DEFAULT: Self = Self {
16384        custom_mode: 0_u32,
16385        latitude: 0_i32,
16386        longitude: 0_i32,
16387        roll: 0_i16,
16388        pitch: 0_i16,
16389        heading: 0_u16,
16390        heading_sp: 0_i16,
16391        altitude_amsl: 0_i16,
16392        altitude_sp: 0_i16,
16393        wp_distance: 0_u16,
16394        base_mode: MavModeFlag::DEFAULT,
16395        landed_state: MavLandedState::DEFAULT,
16396        throttle: 0_i8,
16397        airspeed: 0_u8,
16398        airspeed_sp: 0_u8,
16399        groundspeed: 0_u8,
16400        climb_rate: 0_i8,
16401        gps_nsat: 0_u8,
16402        gps_fix_type: GpsFixType::DEFAULT,
16403        battery_remaining: 0_u8,
16404        temperature: 0_i8,
16405        temperature_air: 0_i8,
16406        failsafe: 0_u8,
16407        wp_num: 0_u8,
16408    };
16409    #[cfg(feature = "arbitrary")]
16410    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16411        use arbitrary::{Arbitrary, Unstructured};
16412        let mut buf = [0u8; 1024];
16413        rng.fill_bytes(&mut buf);
16414        let mut unstructured = Unstructured::new(&buf);
16415        Self::arbitrary(&mut unstructured).unwrap_or_default()
16416    }
16417}
16418impl Default for HIGH_LATENCY_DATA {
16419    fn default() -> Self {
16420        Self::DEFAULT.clone()
16421    }
16422}
16423impl MessageData for HIGH_LATENCY_DATA {
16424    type Message = MavMessage;
16425    const ID: u32 = 234u32;
16426    const NAME: &'static str = "HIGH_LATENCY";
16427    const EXTRA_CRC: u8 = 150u8;
16428    const ENCODED_LEN: usize = 40usize;
16429    fn deser(
16430        _version: MavlinkVersion,
16431        __input: &[u8],
16432    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16433        let avail_len = __input.len();
16434        let mut payload_buf = [0; Self::ENCODED_LEN];
16435        let mut buf = if avail_len < Self::ENCODED_LEN {
16436            payload_buf[0..avail_len].copy_from_slice(__input);
16437            Bytes::new(&payload_buf)
16438        } else {
16439            Bytes::new(__input)
16440        };
16441        let mut __struct = Self::default();
16442        __struct.custom_mode = buf.get_u32_le();
16443        __struct.latitude = buf.get_i32_le();
16444        __struct.longitude = buf.get_i32_le();
16445        __struct.roll = buf.get_i16_le();
16446        __struct.pitch = buf.get_i16_le();
16447        __struct.heading = buf.get_u16_le();
16448        __struct.heading_sp = buf.get_i16_le();
16449        __struct.altitude_amsl = buf.get_i16_le();
16450        __struct.altitude_sp = buf.get_i16_le();
16451        __struct.wp_distance = buf.get_u16_le();
16452        let tmp = buf.get_u8();
16453        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
16454            ::mavlink_core::error::ParserError::InvalidFlag {
16455                flag_type: "MavModeFlag",
16456                value: tmp as u64,
16457            },
16458        )?;
16459        let tmp = buf.get_u8();
16460        __struct.landed_state =
16461            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16462                enum_type: "MavLandedState",
16463                value: tmp as u64,
16464            })?;
16465        __struct.throttle = buf.get_i8();
16466        __struct.airspeed = buf.get_u8();
16467        __struct.airspeed_sp = buf.get_u8();
16468        __struct.groundspeed = buf.get_u8();
16469        __struct.climb_rate = buf.get_i8();
16470        __struct.gps_nsat = buf.get_u8();
16471        let tmp = buf.get_u8();
16472        __struct.gps_fix_type =
16473            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16474                enum_type: "GpsFixType",
16475                value: tmp as u64,
16476            })?;
16477        __struct.battery_remaining = buf.get_u8();
16478        __struct.temperature = buf.get_i8();
16479        __struct.temperature_air = buf.get_i8();
16480        __struct.failsafe = buf.get_u8();
16481        __struct.wp_num = buf.get_u8();
16482        Ok(__struct)
16483    }
16484    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16485        let mut __tmp = BytesMut::new(bytes);
16486        #[allow(clippy::absurd_extreme_comparisons)]
16487        #[allow(unused_comparisons)]
16488        if __tmp.remaining() < Self::ENCODED_LEN {
16489            panic!(
16490                "buffer is too small (need {} bytes, but got {})",
16491                Self::ENCODED_LEN,
16492                __tmp.remaining(),
16493            )
16494        }
16495        __tmp.put_u32_le(self.custom_mode);
16496        __tmp.put_i32_le(self.latitude);
16497        __tmp.put_i32_le(self.longitude);
16498        __tmp.put_i16_le(self.roll);
16499        __tmp.put_i16_le(self.pitch);
16500        __tmp.put_u16_le(self.heading);
16501        __tmp.put_i16_le(self.heading_sp);
16502        __tmp.put_i16_le(self.altitude_amsl);
16503        __tmp.put_i16_le(self.altitude_sp);
16504        __tmp.put_u16_le(self.wp_distance);
16505        __tmp.put_u8(self.base_mode.bits() as u8);
16506        __tmp.put_u8(self.landed_state as u8);
16507        __tmp.put_i8(self.throttle);
16508        __tmp.put_u8(self.airspeed);
16509        __tmp.put_u8(self.airspeed_sp);
16510        __tmp.put_u8(self.groundspeed);
16511        __tmp.put_i8(self.climb_rate);
16512        __tmp.put_u8(self.gps_nsat);
16513        __tmp.put_u8(self.gps_fix_type as u8);
16514        __tmp.put_u8(self.battery_remaining);
16515        __tmp.put_i8(self.temperature);
16516        __tmp.put_i8(self.temperature_air);
16517        __tmp.put_u8(self.failsafe);
16518        __tmp.put_u8(self.wp_num);
16519        if matches!(version, MavlinkVersion::V2) {
16520            let len = __tmp.len();
16521            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16522        } else {
16523            __tmp.len()
16524        }
16525    }
16526}
16527#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
16528#[doc = ""]
16529#[doc = "ID: 235"]
16530#[derive(Debug, Clone, PartialEq)]
16531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16533#[cfg_attr(feature = "ts", derive(TS))]
16534#[cfg_attr(feature = "ts", ts(export))]
16535pub struct HIGH_LATENCY2_DATA {
16536    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
16537    pub timestamp: u32,
16538    #[doc = "Latitude"]
16539    pub latitude: i32,
16540    #[doc = "Longitude"]
16541    pub longitude: i32,
16542    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
16543    pub custom_mode: u16,
16544    #[doc = "Altitude above mean sea level"]
16545    pub altitude: i16,
16546    #[doc = "Altitude setpoint"]
16547    pub target_altitude: i16,
16548    #[doc = "Distance to target waypoint or position"]
16549    pub target_distance: u16,
16550    #[doc = "Current waypoint number"]
16551    pub wp_num: u16,
16552    #[doc = "Bitmap of failure flags."]
16553    pub failure_flags: HlFailureFlag,
16554    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
16555    pub mavtype: MavType,
16556    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
16557    pub autopilot: MavAutopilot,
16558    #[doc = "Heading"]
16559    pub heading: u8,
16560    #[doc = "Heading setpoint"]
16561    pub target_heading: u8,
16562    #[doc = "Throttle"]
16563    pub throttle: u8,
16564    #[doc = "Airspeed"]
16565    pub airspeed: u8,
16566    #[doc = "Airspeed setpoint"]
16567    pub airspeed_sp: u8,
16568    #[doc = "Groundspeed"]
16569    pub groundspeed: u8,
16570    #[doc = "Windspeed"]
16571    pub windspeed: u8,
16572    #[doc = "Wind heading"]
16573    pub wind_heading: u8,
16574    #[doc = "Maximum error horizontal position since last message"]
16575    pub eph: u8,
16576    #[doc = "Maximum error vertical position since last message"]
16577    pub epv: u8,
16578    #[doc = "Air temperature"]
16579    pub temperature_air: i8,
16580    #[doc = "Maximum climb rate magnitude since last message"]
16581    pub climb_rate: i8,
16582    #[doc = "Battery level (-1 if field not provided)."]
16583    pub battery: i8,
16584    #[doc = "Field for custom payload."]
16585    pub custom0: i8,
16586    #[doc = "Field for custom payload."]
16587    pub custom1: i8,
16588    #[doc = "Field for custom payload."]
16589    pub custom2: i8,
16590}
16591impl HIGH_LATENCY2_DATA {
16592    pub const ENCODED_LEN: usize = 42usize;
16593    pub const DEFAULT: Self = Self {
16594        timestamp: 0_u32,
16595        latitude: 0_i32,
16596        longitude: 0_i32,
16597        custom_mode: 0_u16,
16598        altitude: 0_i16,
16599        target_altitude: 0_i16,
16600        target_distance: 0_u16,
16601        wp_num: 0_u16,
16602        failure_flags: HlFailureFlag::DEFAULT,
16603        mavtype: MavType::DEFAULT,
16604        autopilot: MavAutopilot::DEFAULT,
16605        heading: 0_u8,
16606        target_heading: 0_u8,
16607        throttle: 0_u8,
16608        airspeed: 0_u8,
16609        airspeed_sp: 0_u8,
16610        groundspeed: 0_u8,
16611        windspeed: 0_u8,
16612        wind_heading: 0_u8,
16613        eph: 0_u8,
16614        epv: 0_u8,
16615        temperature_air: 0_i8,
16616        climb_rate: 0_i8,
16617        battery: 0_i8,
16618        custom0: 0_i8,
16619        custom1: 0_i8,
16620        custom2: 0_i8,
16621    };
16622    #[cfg(feature = "arbitrary")]
16623    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16624        use arbitrary::{Arbitrary, Unstructured};
16625        let mut buf = [0u8; 1024];
16626        rng.fill_bytes(&mut buf);
16627        let mut unstructured = Unstructured::new(&buf);
16628        Self::arbitrary(&mut unstructured).unwrap_or_default()
16629    }
16630}
16631impl Default for HIGH_LATENCY2_DATA {
16632    fn default() -> Self {
16633        Self::DEFAULT.clone()
16634    }
16635}
16636impl MessageData for HIGH_LATENCY2_DATA {
16637    type Message = MavMessage;
16638    const ID: u32 = 235u32;
16639    const NAME: &'static str = "HIGH_LATENCY2";
16640    const EXTRA_CRC: u8 = 179u8;
16641    const ENCODED_LEN: usize = 42usize;
16642    fn deser(
16643        _version: MavlinkVersion,
16644        __input: &[u8],
16645    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16646        let avail_len = __input.len();
16647        let mut payload_buf = [0; Self::ENCODED_LEN];
16648        let mut buf = if avail_len < Self::ENCODED_LEN {
16649            payload_buf[0..avail_len].copy_from_slice(__input);
16650            Bytes::new(&payload_buf)
16651        } else {
16652            Bytes::new(__input)
16653        };
16654        let mut __struct = Self::default();
16655        __struct.timestamp = buf.get_u32_le();
16656        __struct.latitude = buf.get_i32_le();
16657        __struct.longitude = buf.get_i32_le();
16658        __struct.custom_mode = buf.get_u16_le();
16659        __struct.altitude = buf.get_i16_le();
16660        __struct.target_altitude = buf.get_i16_le();
16661        __struct.target_distance = buf.get_u16_le();
16662        __struct.wp_num = buf.get_u16_le();
16663        let tmp = buf.get_u16_le();
16664        __struct.failure_flags = HlFailureFlag::from_bits(tmp as <HlFailureFlag as Flags>::Bits)
16665            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16666                flag_type: "HlFailureFlag",
16667                value: tmp as u64,
16668            })?;
16669        let tmp = buf.get_u8();
16670        __struct.mavtype =
16671            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16672                enum_type: "MavType",
16673                value: tmp as u64,
16674            })?;
16675        let tmp = buf.get_u8();
16676        __struct.autopilot =
16677            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16678                enum_type: "MavAutopilot",
16679                value: tmp as u64,
16680            })?;
16681        __struct.heading = buf.get_u8();
16682        __struct.target_heading = buf.get_u8();
16683        __struct.throttle = buf.get_u8();
16684        __struct.airspeed = buf.get_u8();
16685        __struct.airspeed_sp = buf.get_u8();
16686        __struct.groundspeed = buf.get_u8();
16687        __struct.windspeed = buf.get_u8();
16688        __struct.wind_heading = buf.get_u8();
16689        __struct.eph = buf.get_u8();
16690        __struct.epv = buf.get_u8();
16691        __struct.temperature_air = buf.get_i8();
16692        __struct.climb_rate = buf.get_i8();
16693        __struct.battery = buf.get_i8();
16694        __struct.custom0 = buf.get_i8();
16695        __struct.custom1 = buf.get_i8();
16696        __struct.custom2 = buf.get_i8();
16697        Ok(__struct)
16698    }
16699    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16700        let mut __tmp = BytesMut::new(bytes);
16701        #[allow(clippy::absurd_extreme_comparisons)]
16702        #[allow(unused_comparisons)]
16703        if __tmp.remaining() < Self::ENCODED_LEN {
16704            panic!(
16705                "buffer is too small (need {} bytes, but got {})",
16706                Self::ENCODED_LEN,
16707                __tmp.remaining(),
16708            )
16709        }
16710        __tmp.put_u32_le(self.timestamp);
16711        __tmp.put_i32_le(self.latitude);
16712        __tmp.put_i32_le(self.longitude);
16713        __tmp.put_u16_le(self.custom_mode);
16714        __tmp.put_i16_le(self.altitude);
16715        __tmp.put_i16_le(self.target_altitude);
16716        __tmp.put_u16_le(self.target_distance);
16717        __tmp.put_u16_le(self.wp_num);
16718        __tmp.put_u16_le(self.failure_flags.bits() as u16);
16719        __tmp.put_u8(self.mavtype as u8);
16720        __tmp.put_u8(self.autopilot as u8);
16721        __tmp.put_u8(self.heading);
16722        __tmp.put_u8(self.target_heading);
16723        __tmp.put_u8(self.throttle);
16724        __tmp.put_u8(self.airspeed);
16725        __tmp.put_u8(self.airspeed_sp);
16726        __tmp.put_u8(self.groundspeed);
16727        __tmp.put_u8(self.windspeed);
16728        __tmp.put_u8(self.wind_heading);
16729        __tmp.put_u8(self.eph);
16730        __tmp.put_u8(self.epv);
16731        __tmp.put_i8(self.temperature_air);
16732        __tmp.put_i8(self.climb_rate);
16733        __tmp.put_i8(self.battery);
16734        __tmp.put_i8(self.custom0);
16735        __tmp.put_i8(self.custom1);
16736        __tmp.put_i8(self.custom2);
16737        if matches!(version, MavlinkVersion::V2) {
16738            let len = __tmp.len();
16739            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16740        } else {
16741            __tmp.len()
16742        }
16743    }
16744}
16745#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
16746#[doc = ""]
16747#[doc = "ID: 93"]
16748#[derive(Debug, Clone, PartialEq)]
16749#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16751#[cfg_attr(feature = "ts", derive(TS))]
16752#[cfg_attr(feature = "ts", ts(export))]
16753pub struct HIL_ACTUATOR_CONTROLS_DATA {
16754    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16755    pub time_usec: u64,
16756    #[doc = "Flags bitmask."]
16757    pub flags: HilActuatorControlsFlags,
16758    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
16759    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16760    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16761    pub controls: [f32; 16],
16762    #[doc = "System mode. Includes arming state."]
16763    pub mode: MavModeFlag,
16764}
16765impl HIL_ACTUATOR_CONTROLS_DATA {
16766    pub const ENCODED_LEN: usize = 81usize;
16767    pub const DEFAULT: Self = Self {
16768        time_usec: 0_u64,
16769        flags: HilActuatorControlsFlags::DEFAULT,
16770        controls: [0.0_f32; 16usize],
16771        mode: MavModeFlag::DEFAULT,
16772    };
16773    #[cfg(feature = "arbitrary")]
16774    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16775        use arbitrary::{Arbitrary, Unstructured};
16776        let mut buf = [0u8; 1024];
16777        rng.fill_bytes(&mut buf);
16778        let mut unstructured = Unstructured::new(&buf);
16779        Self::arbitrary(&mut unstructured).unwrap_or_default()
16780    }
16781}
16782impl Default for HIL_ACTUATOR_CONTROLS_DATA {
16783    fn default() -> Self {
16784        Self::DEFAULT.clone()
16785    }
16786}
16787impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
16788    type Message = MavMessage;
16789    const ID: u32 = 93u32;
16790    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
16791    const EXTRA_CRC: u8 = 47u8;
16792    const ENCODED_LEN: usize = 81usize;
16793    fn deser(
16794        _version: MavlinkVersion,
16795        __input: &[u8],
16796    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16797        let avail_len = __input.len();
16798        let mut payload_buf = [0; Self::ENCODED_LEN];
16799        let mut buf = if avail_len < Self::ENCODED_LEN {
16800            payload_buf[0..avail_len].copy_from_slice(__input);
16801            Bytes::new(&payload_buf)
16802        } else {
16803            Bytes::new(__input)
16804        };
16805        let mut __struct = Self::default();
16806        __struct.time_usec = buf.get_u64_le();
16807        let tmp = buf.get_u64_le();
16808        __struct.flags =
16809            HilActuatorControlsFlags::from_bits(tmp as <HilActuatorControlsFlags as Flags>::Bits)
16810                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16811                flag_type: "HilActuatorControlsFlags",
16812                value: tmp as u64,
16813            })?;
16814        for v in &mut __struct.controls {
16815            let val = buf.get_f32_le();
16816            *v = val;
16817        }
16818        let tmp = buf.get_u8();
16819        __struct.mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
16820            ::mavlink_core::error::ParserError::InvalidFlag {
16821                flag_type: "MavModeFlag",
16822                value: tmp as u64,
16823            },
16824        )?;
16825        Ok(__struct)
16826    }
16827    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16828        let mut __tmp = BytesMut::new(bytes);
16829        #[allow(clippy::absurd_extreme_comparisons)]
16830        #[allow(unused_comparisons)]
16831        if __tmp.remaining() < Self::ENCODED_LEN {
16832            panic!(
16833                "buffer is too small (need {} bytes, but got {})",
16834                Self::ENCODED_LEN,
16835                __tmp.remaining(),
16836            )
16837        }
16838        __tmp.put_u64_le(self.time_usec);
16839        __tmp.put_u64_le(self.flags.bits() as u64);
16840        for val in &self.controls {
16841            __tmp.put_f32_le(*val);
16842        }
16843        __tmp.put_u8(self.mode.bits() as u8);
16844        if matches!(version, MavlinkVersion::V2) {
16845            let len = __tmp.len();
16846            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16847        } else {
16848            __tmp.len()
16849        }
16850    }
16851}
16852#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
16853#[doc = ""]
16854#[doc = "ID: 91"]
16855#[derive(Debug, Clone, PartialEq)]
16856#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16858#[cfg_attr(feature = "ts", derive(TS))]
16859#[cfg_attr(feature = "ts", ts(export))]
16860pub struct HIL_CONTROLS_DATA {
16861    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16862    pub time_usec: u64,
16863    #[doc = "Control output -1 .. 1"]
16864    pub roll_ailerons: f32,
16865    #[doc = "Control output -1 .. 1"]
16866    pub pitch_elevator: f32,
16867    #[doc = "Control output -1 .. 1"]
16868    pub yaw_rudder: f32,
16869    #[doc = "Throttle 0 .. 1"]
16870    pub throttle: f32,
16871    #[doc = "Aux 1, -1 .. 1"]
16872    pub aux1: f32,
16873    #[doc = "Aux 2, -1 .. 1"]
16874    pub aux2: f32,
16875    #[doc = "Aux 3, -1 .. 1"]
16876    pub aux3: f32,
16877    #[doc = "Aux 4, -1 .. 1"]
16878    pub aux4: f32,
16879    #[doc = "System mode."]
16880    pub mode: MavMode,
16881    #[doc = "Navigation mode (MAV_NAV_MODE)"]
16882    pub nav_mode: u8,
16883}
16884impl HIL_CONTROLS_DATA {
16885    pub const ENCODED_LEN: usize = 42usize;
16886    pub const DEFAULT: Self = Self {
16887        time_usec: 0_u64,
16888        roll_ailerons: 0.0_f32,
16889        pitch_elevator: 0.0_f32,
16890        yaw_rudder: 0.0_f32,
16891        throttle: 0.0_f32,
16892        aux1: 0.0_f32,
16893        aux2: 0.0_f32,
16894        aux3: 0.0_f32,
16895        aux4: 0.0_f32,
16896        mode: MavMode::DEFAULT,
16897        nav_mode: 0_u8,
16898    };
16899    #[cfg(feature = "arbitrary")]
16900    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16901        use arbitrary::{Arbitrary, Unstructured};
16902        let mut buf = [0u8; 1024];
16903        rng.fill_bytes(&mut buf);
16904        let mut unstructured = Unstructured::new(&buf);
16905        Self::arbitrary(&mut unstructured).unwrap_or_default()
16906    }
16907}
16908impl Default for HIL_CONTROLS_DATA {
16909    fn default() -> Self {
16910        Self::DEFAULT.clone()
16911    }
16912}
16913impl MessageData for HIL_CONTROLS_DATA {
16914    type Message = MavMessage;
16915    const ID: u32 = 91u32;
16916    const NAME: &'static str = "HIL_CONTROLS";
16917    const EXTRA_CRC: u8 = 63u8;
16918    const ENCODED_LEN: usize = 42usize;
16919    fn deser(
16920        _version: MavlinkVersion,
16921        __input: &[u8],
16922    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16923        let avail_len = __input.len();
16924        let mut payload_buf = [0; Self::ENCODED_LEN];
16925        let mut buf = if avail_len < Self::ENCODED_LEN {
16926            payload_buf[0..avail_len].copy_from_slice(__input);
16927            Bytes::new(&payload_buf)
16928        } else {
16929            Bytes::new(__input)
16930        };
16931        let mut __struct = Self::default();
16932        __struct.time_usec = buf.get_u64_le();
16933        __struct.roll_ailerons = buf.get_f32_le();
16934        __struct.pitch_elevator = buf.get_f32_le();
16935        __struct.yaw_rudder = buf.get_f32_le();
16936        __struct.throttle = buf.get_f32_le();
16937        __struct.aux1 = buf.get_f32_le();
16938        __struct.aux2 = buf.get_f32_le();
16939        __struct.aux3 = buf.get_f32_le();
16940        __struct.aux4 = buf.get_f32_le();
16941        let tmp = buf.get_u8();
16942        __struct.mode =
16943            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16944                enum_type: "MavMode",
16945                value: tmp as u64,
16946            })?;
16947        __struct.nav_mode = buf.get_u8();
16948        Ok(__struct)
16949    }
16950    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16951        let mut __tmp = BytesMut::new(bytes);
16952        #[allow(clippy::absurd_extreme_comparisons)]
16953        #[allow(unused_comparisons)]
16954        if __tmp.remaining() < Self::ENCODED_LEN {
16955            panic!(
16956                "buffer is too small (need {} bytes, but got {})",
16957                Self::ENCODED_LEN,
16958                __tmp.remaining(),
16959            )
16960        }
16961        __tmp.put_u64_le(self.time_usec);
16962        __tmp.put_f32_le(self.roll_ailerons);
16963        __tmp.put_f32_le(self.pitch_elevator);
16964        __tmp.put_f32_le(self.yaw_rudder);
16965        __tmp.put_f32_le(self.throttle);
16966        __tmp.put_f32_le(self.aux1);
16967        __tmp.put_f32_le(self.aux2);
16968        __tmp.put_f32_le(self.aux3);
16969        __tmp.put_f32_le(self.aux4);
16970        __tmp.put_u8(self.mode as u8);
16971        __tmp.put_u8(self.nav_mode);
16972        if matches!(version, MavlinkVersion::V2) {
16973            let len = __tmp.len();
16974            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16975        } else {
16976            __tmp.len()
16977        }
16978    }
16979}
16980#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16981#[doc = ""]
16982#[doc = "ID: 113"]
16983#[derive(Debug, Clone, PartialEq)]
16984#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16985#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16986#[cfg_attr(feature = "ts", derive(TS))]
16987#[cfg_attr(feature = "ts", ts(export))]
16988pub struct HIL_GPS_DATA {
16989    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16990    pub time_usec: u64,
16991    #[doc = "Latitude (WGS84)"]
16992    pub lat: i32,
16993    #[doc = "Longitude (WGS84)"]
16994    pub lon: i32,
16995    #[doc = "Altitude (MSL). Positive for up."]
16996    pub alt: i32,
16997    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16998    pub eph: u16,
16999    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
17000    pub epv: u16,
17001    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
17002    pub vel: u16,
17003    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
17004    pub vn: i16,
17005    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
17006    pub ve: i16,
17007    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
17008    pub vd: i16,
17009    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
17010    pub cog: u16,
17011    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
17012    pub fix_type: u8,
17013    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
17014    pub satellites_visible: u8,
17015    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
17016    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17017    pub id: u8,
17018    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
17019    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17020    pub yaw: u16,
17021}
17022impl HIL_GPS_DATA {
17023    pub const ENCODED_LEN: usize = 39usize;
17024    pub const DEFAULT: Self = Self {
17025        time_usec: 0_u64,
17026        lat: 0_i32,
17027        lon: 0_i32,
17028        alt: 0_i32,
17029        eph: 0_u16,
17030        epv: 0_u16,
17031        vel: 0_u16,
17032        vn: 0_i16,
17033        ve: 0_i16,
17034        vd: 0_i16,
17035        cog: 0_u16,
17036        fix_type: 0_u8,
17037        satellites_visible: 0_u8,
17038        id: 0_u8,
17039        yaw: 0_u16,
17040    };
17041    #[cfg(feature = "arbitrary")]
17042    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17043        use arbitrary::{Arbitrary, Unstructured};
17044        let mut buf = [0u8; 1024];
17045        rng.fill_bytes(&mut buf);
17046        let mut unstructured = Unstructured::new(&buf);
17047        Self::arbitrary(&mut unstructured).unwrap_or_default()
17048    }
17049}
17050impl Default for HIL_GPS_DATA {
17051    fn default() -> Self {
17052        Self::DEFAULT.clone()
17053    }
17054}
17055impl MessageData for HIL_GPS_DATA {
17056    type Message = MavMessage;
17057    const ID: u32 = 113u32;
17058    const NAME: &'static str = "HIL_GPS";
17059    const EXTRA_CRC: u8 = 124u8;
17060    const ENCODED_LEN: usize = 39usize;
17061    fn deser(
17062        _version: MavlinkVersion,
17063        __input: &[u8],
17064    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17065        let avail_len = __input.len();
17066        let mut payload_buf = [0; Self::ENCODED_LEN];
17067        let mut buf = if avail_len < Self::ENCODED_LEN {
17068            payload_buf[0..avail_len].copy_from_slice(__input);
17069            Bytes::new(&payload_buf)
17070        } else {
17071            Bytes::new(__input)
17072        };
17073        let mut __struct = Self::default();
17074        __struct.time_usec = buf.get_u64_le();
17075        __struct.lat = buf.get_i32_le();
17076        __struct.lon = buf.get_i32_le();
17077        __struct.alt = buf.get_i32_le();
17078        __struct.eph = buf.get_u16_le();
17079        __struct.epv = buf.get_u16_le();
17080        __struct.vel = buf.get_u16_le();
17081        __struct.vn = buf.get_i16_le();
17082        __struct.ve = buf.get_i16_le();
17083        __struct.vd = buf.get_i16_le();
17084        __struct.cog = buf.get_u16_le();
17085        __struct.fix_type = buf.get_u8();
17086        __struct.satellites_visible = buf.get_u8();
17087        __struct.id = buf.get_u8();
17088        __struct.yaw = buf.get_u16_le();
17089        Ok(__struct)
17090    }
17091    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17092        let mut __tmp = BytesMut::new(bytes);
17093        #[allow(clippy::absurd_extreme_comparisons)]
17094        #[allow(unused_comparisons)]
17095        if __tmp.remaining() < Self::ENCODED_LEN {
17096            panic!(
17097                "buffer is too small (need {} bytes, but got {})",
17098                Self::ENCODED_LEN,
17099                __tmp.remaining(),
17100            )
17101        }
17102        __tmp.put_u64_le(self.time_usec);
17103        __tmp.put_i32_le(self.lat);
17104        __tmp.put_i32_le(self.lon);
17105        __tmp.put_i32_le(self.alt);
17106        __tmp.put_u16_le(self.eph);
17107        __tmp.put_u16_le(self.epv);
17108        __tmp.put_u16_le(self.vel);
17109        __tmp.put_i16_le(self.vn);
17110        __tmp.put_i16_le(self.ve);
17111        __tmp.put_i16_le(self.vd);
17112        __tmp.put_u16_le(self.cog);
17113        __tmp.put_u8(self.fix_type);
17114        __tmp.put_u8(self.satellites_visible);
17115        if matches!(version, MavlinkVersion::V2) {
17116            __tmp.put_u8(self.id);
17117            __tmp.put_u16_le(self.yaw);
17118            let len = __tmp.len();
17119            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17120        } else {
17121            __tmp.len()
17122        }
17123    }
17124}
17125#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
17126#[doc = ""]
17127#[doc = "ID: 114"]
17128#[derive(Debug, Clone, PartialEq)]
17129#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17131#[cfg_attr(feature = "ts", derive(TS))]
17132#[cfg_attr(feature = "ts", ts(export))]
17133pub struct HIL_OPTICAL_FLOW_DATA {
17134    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17135    pub time_usec: u64,
17136    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
17137    pub integration_time_us: u32,
17138    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
17139    pub integrated_x: f32,
17140    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
17141    pub integrated_y: f32,
17142    #[doc = "RH rotation around X axis"]
17143    pub integrated_xgyro: f32,
17144    #[doc = "RH rotation around Y axis"]
17145    pub integrated_ygyro: f32,
17146    #[doc = "RH rotation around Z axis"]
17147    pub integrated_zgyro: f32,
17148    #[doc = "Time since the distance was sampled."]
17149    pub time_delta_distance_us: u32,
17150    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
17151    pub distance: f32,
17152    #[doc = "Temperature"]
17153    pub temperature: i16,
17154    #[doc = "Sensor ID"]
17155    pub sensor_id: u8,
17156    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
17157    pub quality: u8,
17158}
17159impl HIL_OPTICAL_FLOW_DATA {
17160    pub const ENCODED_LEN: usize = 44usize;
17161    pub const DEFAULT: Self = Self {
17162        time_usec: 0_u64,
17163        integration_time_us: 0_u32,
17164        integrated_x: 0.0_f32,
17165        integrated_y: 0.0_f32,
17166        integrated_xgyro: 0.0_f32,
17167        integrated_ygyro: 0.0_f32,
17168        integrated_zgyro: 0.0_f32,
17169        time_delta_distance_us: 0_u32,
17170        distance: 0.0_f32,
17171        temperature: 0_i16,
17172        sensor_id: 0_u8,
17173        quality: 0_u8,
17174    };
17175    #[cfg(feature = "arbitrary")]
17176    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17177        use arbitrary::{Arbitrary, Unstructured};
17178        let mut buf = [0u8; 1024];
17179        rng.fill_bytes(&mut buf);
17180        let mut unstructured = Unstructured::new(&buf);
17181        Self::arbitrary(&mut unstructured).unwrap_or_default()
17182    }
17183}
17184impl Default for HIL_OPTICAL_FLOW_DATA {
17185    fn default() -> Self {
17186        Self::DEFAULT.clone()
17187    }
17188}
17189impl MessageData for HIL_OPTICAL_FLOW_DATA {
17190    type Message = MavMessage;
17191    const ID: u32 = 114u32;
17192    const NAME: &'static str = "HIL_OPTICAL_FLOW";
17193    const EXTRA_CRC: u8 = 237u8;
17194    const ENCODED_LEN: usize = 44usize;
17195    fn deser(
17196        _version: MavlinkVersion,
17197        __input: &[u8],
17198    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17199        let avail_len = __input.len();
17200        let mut payload_buf = [0; Self::ENCODED_LEN];
17201        let mut buf = if avail_len < Self::ENCODED_LEN {
17202            payload_buf[0..avail_len].copy_from_slice(__input);
17203            Bytes::new(&payload_buf)
17204        } else {
17205            Bytes::new(__input)
17206        };
17207        let mut __struct = Self::default();
17208        __struct.time_usec = buf.get_u64_le();
17209        __struct.integration_time_us = buf.get_u32_le();
17210        __struct.integrated_x = buf.get_f32_le();
17211        __struct.integrated_y = buf.get_f32_le();
17212        __struct.integrated_xgyro = buf.get_f32_le();
17213        __struct.integrated_ygyro = buf.get_f32_le();
17214        __struct.integrated_zgyro = buf.get_f32_le();
17215        __struct.time_delta_distance_us = buf.get_u32_le();
17216        __struct.distance = buf.get_f32_le();
17217        __struct.temperature = buf.get_i16_le();
17218        __struct.sensor_id = buf.get_u8();
17219        __struct.quality = buf.get_u8();
17220        Ok(__struct)
17221    }
17222    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17223        let mut __tmp = BytesMut::new(bytes);
17224        #[allow(clippy::absurd_extreme_comparisons)]
17225        #[allow(unused_comparisons)]
17226        if __tmp.remaining() < Self::ENCODED_LEN {
17227            panic!(
17228                "buffer is too small (need {} bytes, but got {})",
17229                Self::ENCODED_LEN,
17230                __tmp.remaining(),
17231            )
17232        }
17233        __tmp.put_u64_le(self.time_usec);
17234        __tmp.put_u32_le(self.integration_time_us);
17235        __tmp.put_f32_le(self.integrated_x);
17236        __tmp.put_f32_le(self.integrated_y);
17237        __tmp.put_f32_le(self.integrated_xgyro);
17238        __tmp.put_f32_le(self.integrated_ygyro);
17239        __tmp.put_f32_le(self.integrated_zgyro);
17240        __tmp.put_u32_le(self.time_delta_distance_us);
17241        __tmp.put_f32_le(self.distance);
17242        __tmp.put_i16_le(self.temperature);
17243        __tmp.put_u8(self.sensor_id);
17244        __tmp.put_u8(self.quality);
17245        if matches!(version, MavlinkVersion::V2) {
17246            let len = __tmp.len();
17247            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17248        } else {
17249            __tmp.len()
17250        }
17251    }
17252}
17253#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
17254#[doc = ""]
17255#[doc = "ID: 92"]
17256#[derive(Debug, Clone, PartialEq)]
17257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17259#[cfg_attr(feature = "ts", derive(TS))]
17260#[cfg_attr(feature = "ts", ts(export))]
17261pub struct HIL_RC_INPUTS_RAW_DATA {
17262    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17263    pub time_usec: u64,
17264    #[doc = "RC channel 1 value"]
17265    pub chan1_raw: u16,
17266    #[doc = "RC channel 2 value"]
17267    pub chan2_raw: u16,
17268    #[doc = "RC channel 3 value"]
17269    pub chan3_raw: u16,
17270    #[doc = "RC channel 4 value"]
17271    pub chan4_raw: u16,
17272    #[doc = "RC channel 5 value"]
17273    pub chan5_raw: u16,
17274    #[doc = "RC channel 6 value"]
17275    pub chan6_raw: u16,
17276    #[doc = "RC channel 7 value"]
17277    pub chan7_raw: u16,
17278    #[doc = "RC channel 8 value"]
17279    pub chan8_raw: u16,
17280    #[doc = "RC channel 9 value"]
17281    pub chan9_raw: u16,
17282    #[doc = "RC channel 10 value"]
17283    pub chan10_raw: u16,
17284    #[doc = "RC channel 11 value"]
17285    pub chan11_raw: u16,
17286    #[doc = "RC channel 12 value"]
17287    pub chan12_raw: u16,
17288    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
17289    pub rssi: u8,
17290}
17291impl HIL_RC_INPUTS_RAW_DATA {
17292    pub const ENCODED_LEN: usize = 33usize;
17293    pub const DEFAULT: Self = Self {
17294        time_usec: 0_u64,
17295        chan1_raw: 0_u16,
17296        chan2_raw: 0_u16,
17297        chan3_raw: 0_u16,
17298        chan4_raw: 0_u16,
17299        chan5_raw: 0_u16,
17300        chan6_raw: 0_u16,
17301        chan7_raw: 0_u16,
17302        chan8_raw: 0_u16,
17303        chan9_raw: 0_u16,
17304        chan10_raw: 0_u16,
17305        chan11_raw: 0_u16,
17306        chan12_raw: 0_u16,
17307        rssi: 0_u8,
17308    };
17309    #[cfg(feature = "arbitrary")]
17310    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17311        use arbitrary::{Arbitrary, Unstructured};
17312        let mut buf = [0u8; 1024];
17313        rng.fill_bytes(&mut buf);
17314        let mut unstructured = Unstructured::new(&buf);
17315        Self::arbitrary(&mut unstructured).unwrap_or_default()
17316    }
17317}
17318impl Default for HIL_RC_INPUTS_RAW_DATA {
17319    fn default() -> Self {
17320        Self::DEFAULT.clone()
17321    }
17322}
17323impl MessageData for HIL_RC_INPUTS_RAW_DATA {
17324    type Message = MavMessage;
17325    const ID: u32 = 92u32;
17326    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
17327    const EXTRA_CRC: u8 = 54u8;
17328    const ENCODED_LEN: usize = 33usize;
17329    fn deser(
17330        _version: MavlinkVersion,
17331        __input: &[u8],
17332    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17333        let avail_len = __input.len();
17334        let mut payload_buf = [0; Self::ENCODED_LEN];
17335        let mut buf = if avail_len < Self::ENCODED_LEN {
17336            payload_buf[0..avail_len].copy_from_slice(__input);
17337            Bytes::new(&payload_buf)
17338        } else {
17339            Bytes::new(__input)
17340        };
17341        let mut __struct = Self::default();
17342        __struct.time_usec = buf.get_u64_le();
17343        __struct.chan1_raw = buf.get_u16_le();
17344        __struct.chan2_raw = buf.get_u16_le();
17345        __struct.chan3_raw = buf.get_u16_le();
17346        __struct.chan4_raw = buf.get_u16_le();
17347        __struct.chan5_raw = buf.get_u16_le();
17348        __struct.chan6_raw = buf.get_u16_le();
17349        __struct.chan7_raw = buf.get_u16_le();
17350        __struct.chan8_raw = buf.get_u16_le();
17351        __struct.chan9_raw = buf.get_u16_le();
17352        __struct.chan10_raw = buf.get_u16_le();
17353        __struct.chan11_raw = buf.get_u16_le();
17354        __struct.chan12_raw = buf.get_u16_le();
17355        __struct.rssi = buf.get_u8();
17356        Ok(__struct)
17357    }
17358    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17359        let mut __tmp = BytesMut::new(bytes);
17360        #[allow(clippy::absurd_extreme_comparisons)]
17361        #[allow(unused_comparisons)]
17362        if __tmp.remaining() < Self::ENCODED_LEN {
17363            panic!(
17364                "buffer is too small (need {} bytes, but got {})",
17365                Self::ENCODED_LEN,
17366                __tmp.remaining(),
17367            )
17368        }
17369        __tmp.put_u64_le(self.time_usec);
17370        __tmp.put_u16_le(self.chan1_raw);
17371        __tmp.put_u16_le(self.chan2_raw);
17372        __tmp.put_u16_le(self.chan3_raw);
17373        __tmp.put_u16_le(self.chan4_raw);
17374        __tmp.put_u16_le(self.chan5_raw);
17375        __tmp.put_u16_le(self.chan6_raw);
17376        __tmp.put_u16_le(self.chan7_raw);
17377        __tmp.put_u16_le(self.chan8_raw);
17378        __tmp.put_u16_le(self.chan9_raw);
17379        __tmp.put_u16_le(self.chan10_raw);
17380        __tmp.put_u16_le(self.chan11_raw);
17381        __tmp.put_u16_le(self.chan12_raw);
17382        __tmp.put_u8(self.rssi);
17383        if matches!(version, MavlinkVersion::V2) {
17384            let len = __tmp.len();
17385            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17386        } else {
17387            __tmp.len()
17388        }
17389    }
17390}
17391#[doc = "The IMU readings in SI units in NED body frame."]
17392#[doc = ""]
17393#[doc = "ID: 107"]
17394#[derive(Debug, Clone, PartialEq)]
17395#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17396#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17397#[cfg_attr(feature = "ts", derive(TS))]
17398#[cfg_attr(feature = "ts", ts(export))]
17399pub struct HIL_SENSOR_DATA {
17400    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17401    pub time_usec: u64,
17402    #[doc = "X acceleration"]
17403    pub xacc: f32,
17404    #[doc = "Y acceleration"]
17405    pub yacc: f32,
17406    #[doc = "Z acceleration"]
17407    pub zacc: f32,
17408    #[doc = "Angular speed around X axis in body frame"]
17409    pub xgyro: f32,
17410    #[doc = "Angular speed around Y axis in body frame"]
17411    pub ygyro: f32,
17412    #[doc = "Angular speed around Z axis in body frame"]
17413    pub zgyro: f32,
17414    #[doc = "X Magnetic field"]
17415    pub xmag: f32,
17416    #[doc = "Y Magnetic field"]
17417    pub ymag: f32,
17418    #[doc = "Z Magnetic field"]
17419    pub zmag: f32,
17420    #[doc = "Absolute pressure"]
17421    pub abs_pressure: f32,
17422    #[doc = "Differential pressure (airspeed)"]
17423    pub diff_pressure: f32,
17424    #[doc = "Altitude calculated from pressure"]
17425    pub pressure_alt: f32,
17426    #[doc = "Temperature"]
17427    pub temperature: f32,
17428    #[doc = "Bitmap for fields that have updated since last message"]
17429    pub fields_updated: HilSensorUpdatedFlags,
17430    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
17431    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17432    pub id: u8,
17433}
17434impl HIL_SENSOR_DATA {
17435    pub const ENCODED_LEN: usize = 65usize;
17436    pub const DEFAULT: Self = Self {
17437        time_usec: 0_u64,
17438        xacc: 0.0_f32,
17439        yacc: 0.0_f32,
17440        zacc: 0.0_f32,
17441        xgyro: 0.0_f32,
17442        ygyro: 0.0_f32,
17443        zgyro: 0.0_f32,
17444        xmag: 0.0_f32,
17445        ymag: 0.0_f32,
17446        zmag: 0.0_f32,
17447        abs_pressure: 0.0_f32,
17448        diff_pressure: 0.0_f32,
17449        pressure_alt: 0.0_f32,
17450        temperature: 0.0_f32,
17451        fields_updated: HilSensorUpdatedFlags::DEFAULT,
17452        id: 0_u8,
17453    };
17454    #[cfg(feature = "arbitrary")]
17455    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17456        use arbitrary::{Arbitrary, Unstructured};
17457        let mut buf = [0u8; 1024];
17458        rng.fill_bytes(&mut buf);
17459        let mut unstructured = Unstructured::new(&buf);
17460        Self::arbitrary(&mut unstructured).unwrap_or_default()
17461    }
17462}
17463impl Default for HIL_SENSOR_DATA {
17464    fn default() -> Self {
17465        Self::DEFAULT.clone()
17466    }
17467}
17468impl MessageData for HIL_SENSOR_DATA {
17469    type Message = MavMessage;
17470    const ID: u32 = 107u32;
17471    const NAME: &'static str = "HIL_SENSOR";
17472    const EXTRA_CRC: u8 = 108u8;
17473    const ENCODED_LEN: usize = 65usize;
17474    fn deser(
17475        _version: MavlinkVersion,
17476        __input: &[u8],
17477    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17478        let avail_len = __input.len();
17479        let mut payload_buf = [0; Self::ENCODED_LEN];
17480        let mut buf = if avail_len < Self::ENCODED_LEN {
17481            payload_buf[0..avail_len].copy_from_slice(__input);
17482            Bytes::new(&payload_buf)
17483        } else {
17484            Bytes::new(__input)
17485        };
17486        let mut __struct = Self::default();
17487        __struct.time_usec = buf.get_u64_le();
17488        __struct.xacc = buf.get_f32_le();
17489        __struct.yacc = buf.get_f32_le();
17490        __struct.zacc = buf.get_f32_le();
17491        __struct.xgyro = buf.get_f32_le();
17492        __struct.ygyro = buf.get_f32_le();
17493        __struct.zgyro = buf.get_f32_le();
17494        __struct.xmag = buf.get_f32_le();
17495        __struct.ymag = buf.get_f32_le();
17496        __struct.zmag = buf.get_f32_le();
17497        __struct.abs_pressure = buf.get_f32_le();
17498        __struct.diff_pressure = buf.get_f32_le();
17499        __struct.pressure_alt = buf.get_f32_le();
17500        __struct.temperature = buf.get_f32_le();
17501        let tmp = buf.get_u32_le();
17502        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
17503            tmp as <HilSensorUpdatedFlags as Flags>::Bits,
17504        )
17505        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17506            flag_type: "HilSensorUpdatedFlags",
17507            value: tmp as u64,
17508        })?;
17509        __struct.id = buf.get_u8();
17510        Ok(__struct)
17511    }
17512    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17513        let mut __tmp = BytesMut::new(bytes);
17514        #[allow(clippy::absurd_extreme_comparisons)]
17515        #[allow(unused_comparisons)]
17516        if __tmp.remaining() < Self::ENCODED_LEN {
17517            panic!(
17518                "buffer is too small (need {} bytes, but got {})",
17519                Self::ENCODED_LEN,
17520                __tmp.remaining(),
17521            )
17522        }
17523        __tmp.put_u64_le(self.time_usec);
17524        __tmp.put_f32_le(self.xacc);
17525        __tmp.put_f32_le(self.yacc);
17526        __tmp.put_f32_le(self.zacc);
17527        __tmp.put_f32_le(self.xgyro);
17528        __tmp.put_f32_le(self.ygyro);
17529        __tmp.put_f32_le(self.zgyro);
17530        __tmp.put_f32_le(self.xmag);
17531        __tmp.put_f32_le(self.ymag);
17532        __tmp.put_f32_le(self.zmag);
17533        __tmp.put_f32_le(self.abs_pressure);
17534        __tmp.put_f32_le(self.diff_pressure);
17535        __tmp.put_f32_le(self.pressure_alt);
17536        __tmp.put_f32_le(self.temperature);
17537        __tmp.put_u32_le(self.fields_updated.bits() as u32);
17538        if matches!(version, MavlinkVersion::V2) {
17539            __tmp.put_u8(self.id);
17540            let len = __tmp.len();
17541            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17542        } else {
17543            __tmp.len()
17544        }
17545    }
17546}
17547#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
17548#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17549#[doc = ""]
17550#[doc = "ID: 90"]
17551#[derive(Debug, Clone, PartialEq)]
17552#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17553#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17554#[cfg_attr(feature = "ts", derive(TS))]
17555#[cfg_attr(feature = "ts", ts(export))]
17556pub struct HIL_STATE_DATA {
17557    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17558    pub time_usec: u64,
17559    #[doc = "Roll angle"]
17560    pub roll: f32,
17561    #[doc = "Pitch angle"]
17562    pub pitch: f32,
17563    #[doc = "Yaw angle"]
17564    pub yaw: f32,
17565    #[doc = "Body frame roll / phi angular speed"]
17566    pub rollspeed: f32,
17567    #[doc = "Body frame pitch / theta angular speed"]
17568    pub pitchspeed: f32,
17569    #[doc = "Body frame yaw / psi angular speed"]
17570    pub yawspeed: f32,
17571    #[doc = "Latitude"]
17572    pub lat: i32,
17573    #[doc = "Longitude"]
17574    pub lon: i32,
17575    #[doc = "Altitude"]
17576    pub alt: i32,
17577    #[doc = "Ground X Speed (Latitude)"]
17578    pub vx: i16,
17579    #[doc = "Ground Y Speed (Longitude)"]
17580    pub vy: i16,
17581    #[doc = "Ground Z Speed (Altitude)"]
17582    pub vz: i16,
17583    #[doc = "X acceleration"]
17584    pub xacc: i16,
17585    #[doc = "Y acceleration"]
17586    pub yacc: i16,
17587    #[doc = "Z acceleration"]
17588    pub zacc: i16,
17589}
17590impl HIL_STATE_DATA {
17591    pub const ENCODED_LEN: usize = 56usize;
17592    pub const DEFAULT: Self = Self {
17593        time_usec: 0_u64,
17594        roll: 0.0_f32,
17595        pitch: 0.0_f32,
17596        yaw: 0.0_f32,
17597        rollspeed: 0.0_f32,
17598        pitchspeed: 0.0_f32,
17599        yawspeed: 0.0_f32,
17600        lat: 0_i32,
17601        lon: 0_i32,
17602        alt: 0_i32,
17603        vx: 0_i16,
17604        vy: 0_i16,
17605        vz: 0_i16,
17606        xacc: 0_i16,
17607        yacc: 0_i16,
17608        zacc: 0_i16,
17609    };
17610    #[cfg(feature = "arbitrary")]
17611    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17612        use arbitrary::{Arbitrary, Unstructured};
17613        let mut buf = [0u8; 1024];
17614        rng.fill_bytes(&mut buf);
17615        let mut unstructured = Unstructured::new(&buf);
17616        Self::arbitrary(&mut unstructured).unwrap_or_default()
17617    }
17618}
17619impl Default for HIL_STATE_DATA {
17620    fn default() -> Self {
17621        Self::DEFAULT.clone()
17622    }
17623}
17624impl MessageData for HIL_STATE_DATA {
17625    type Message = MavMessage;
17626    const ID: u32 = 90u32;
17627    const NAME: &'static str = "HIL_STATE";
17628    const EXTRA_CRC: u8 = 183u8;
17629    const ENCODED_LEN: usize = 56usize;
17630    fn deser(
17631        _version: MavlinkVersion,
17632        __input: &[u8],
17633    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17634        let avail_len = __input.len();
17635        let mut payload_buf = [0; Self::ENCODED_LEN];
17636        let mut buf = if avail_len < Self::ENCODED_LEN {
17637            payload_buf[0..avail_len].copy_from_slice(__input);
17638            Bytes::new(&payload_buf)
17639        } else {
17640            Bytes::new(__input)
17641        };
17642        let mut __struct = Self::default();
17643        __struct.time_usec = buf.get_u64_le();
17644        __struct.roll = buf.get_f32_le();
17645        __struct.pitch = buf.get_f32_le();
17646        __struct.yaw = buf.get_f32_le();
17647        __struct.rollspeed = buf.get_f32_le();
17648        __struct.pitchspeed = buf.get_f32_le();
17649        __struct.yawspeed = buf.get_f32_le();
17650        __struct.lat = buf.get_i32_le();
17651        __struct.lon = buf.get_i32_le();
17652        __struct.alt = buf.get_i32_le();
17653        __struct.vx = buf.get_i16_le();
17654        __struct.vy = buf.get_i16_le();
17655        __struct.vz = buf.get_i16_le();
17656        __struct.xacc = buf.get_i16_le();
17657        __struct.yacc = buf.get_i16_le();
17658        __struct.zacc = buf.get_i16_le();
17659        Ok(__struct)
17660    }
17661    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17662        let mut __tmp = BytesMut::new(bytes);
17663        #[allow(clippy::absurd_extreme_comparisons)]
17664        #[allow(unused_comparisons)]
17665        if __tmp.remaining() < Self::ENCODED_LEN {
17666            panic!(
17667                "buffer is too small (need {} bytes, but got {})",
17668                Self::ENCODED_LEN,
17669                __tmp.remaining(),
17670            )
17671        }
17672        __tmp.put_u64_le(self.time_usec);
17673        __tmp.put_f32_le(self.roll);
17674        __tmp.put_f32_le(self.pitch);
17675        __tmp.put_f32_le(self.yaw);
17676        __tmp.put_f32_le(self.rollspeed);
17677        __tmp.put_f32_le(self.pitchspeed);
17678        __tmp.put_f32_le(self.yawspeed);
17679        __tmp.put_i32_le(self.lat);
17680        __tmp.put_i32_le(self.lon);
17681        __tmp.put_i32_le(self.alt);
17682        __tmp.put_i16_le(self.vx);
17683        __tmp.put_i16_le(self.vy);
17684        __tmp.put_i16_le(self.vz);
17685        __tmp.put_i16_le(self.xacc);
17686        __tmp.put_i16_le(self.yacc);
17687        __tmp.put_i16_le(self.zacc);
17688        if matches!(version, MavlinkVersion::V2) {
17689            let len = __tmp.len();
17690            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17691        } else {
17692            __tmp.len()
17693        }
17694    }
17695}
17696#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17697#[doc = ""]
17698#[doc = "ID: 115"]
17699#[derive(Debug, Clone, PartialEq)]
17700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17702#[cfg_attr(feature = "ts", derive(TS))]
17703#[cfg_attr(feature = "ts", ts(export))]
17704pub struct HIL_STATE_QUATERNION_DATA {
17705    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17706    pub time_usec: u64,
17707    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
17708    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17709    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17710    pub attitude_quaternion: [f32; 4],
17711    #[doc = "Body frame roll / phi angular speed"]
17712    pub rollspeed: f32,
17713    #[doc = "Body frame pitch / theta angular speed"]
17714    pub pitchspeed: f32,
17715    #[doc = "Body frame yaw / psi angular speed"]
17716    pub yawspeed: f32,
17717    #[doc = "Latitude"]
17718    pub lat: i32,
17719    #[doc = "Longitude"]
17720    pub lon: i32,
17721    #[doc = "Altitude"]
17722    pub alt: i32,
17723    #[doc = "Ground X Speed (Latitude)"]
17724    pub vx: i16,
17725    #[doc = "Ground Y Speed (Longitude)"]
17726    pub vy: i16,
17727    #[doc = "Ground Z Speed (Altitude)"]
17728    pub vz: i16,
17729    #[doc = "Indicated airspeed"]
17730    pub ind_airspeed: u16,
17731    #[doc = "True airspeed"]
17732    pub true_airspeed: u16,
17733    #[doc = "X acceleration"]
17734    pub xacc: i16,
17735    #[doc = "Y acceleration"]
17736    pub yacc: i16,
17737    #[doc = "Z acceleration"]
17738    pub zacc: i16,
17739}
17740impl HIL_STATE_QUATERNION_DATA {
17741    pub const ENCODED_LEN: usize = 64usize;
17742    pub const DEFAULT: Self = Self {
17743        time_usec: 0_u64,
17744        attitude_quaternion: [0.0_f32; 4usize],
17745        rollspeed: 0.0_f32,
17746        pitchspeed: 0.0_f32,
17747        yawspeed: 0.0_f32,
17748        lat: 0_i32,
17749        lon: 0_i32,
17750        alt: 0_i32,
17751        vx: 0_i16,
17752        vy: 0_i16,
17753        vz: 0_i16,
17754        ind_airspeed: 0_u16,
17755        true_airspeed: 0_u16,
17756        xacc: 0_i16,
17757        yacc: 0_i16,
17758        zacc: 0_i16,
17759    };
17760    #[cfg(feature = "arbitrary")]
17761    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17762        use arbitrary::{Arbitrary, Unstructured};
17763        let mut buf = [0u8; 1024];
17764        rng.fill_bytes(&mut buf);
17765        let mut unstructured = Unstructured::new(&buf);
17766        Self::arbitrary(&mut unstructured).unwrap_or_default()
17767    }
17768}
17769impl Default for HIL_STATE_QUATERNION_DATA {
17770    fn default() -> Self {
17771        Self::DEFAULT.clone()
17772    }
17773}
17774impl MessageData for HIL_STATE_QUATERNION_DATA {
17775    type Message = MavMessage;
17776    const ID: u32 = 115u32;
17777    const NAME: &'static str = "HIL_STATE_QUATERNION";
17778    const EXTRA_CRC: u8 = 4u8;
17779    const ENCODED_LEN: usize = 64usize;
17780    fn deser(
17781        _version: MavlinkVersion,
17782        __input: &[u8],
17783    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17784        let avail_len = __input.len();
17785        let mut payload_buf = [0; Self::ENCODED_LEN];
17786        let mut buf = if avail_len < Self::ENCODED_LEN {
17787            payload_buf[0..avail_len].copy_from_slice(__input);
17788            Bytes::new(&payload_buf)
17789        } else {
17790            Bytes::new(__input)
17791        };
17792        let mut __struct = Self::default();
17793        __struct.time_usec = buf.get_u64_le();
17794        for v in &mut __struct.attitude_quaternion {
17795            let val = buf.get_f32_le();
17796            *v = val;
17797        }
17798        __struct.rollspeed = buf.get_f32_le();
17799        __struct.pitchspeed = buf.get_f32_le();
17800        __struct.yawspeed = buf.get_f32_le();
17801        __struct.lat = buf.get_i32_le();
17802        __struct.lon = buf.get_i32_le();
17803        __struct.alt = buf.get_i32_le();
17804        __struct.vx = buf.get_i16_le();
17805        __struct.vy = buf.get_i16_le();
17806        __struct.vz = buf.get_i16_le();
17807        __struct.ind_airspeed = buf.get_u16_le();
17808        __struct.true_airspeed = buf.get_u16_le();
17809        __struct.xacc = buf.get_i16_le();
17810        __struct.yacc = buf.get_i16_le();
17811        __struct.zacc = buf.get_i16_le();
17812        Ok(__struct)
17813    }
17814    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17815        let mut __tmp = BytesMut::new(bytes);
17816        #[allow(clippy::absurd_extreme_comparisons)]
17817        #[allow(unused_comparisons)]
17818        if __tmp.remaining() < Self::ENCODED_LEN {
17819            panic!(
17820                "buffer is too small (need {} bytes, but got {})",
17821                Self::ENCODED_LEN,
17822                __tmp.remaining(),
17823            )
17824        }
17825        __tmp.put_u64_le(self.time_usec);
17826        for val in &self.attitude_quaternion {
17827            __tmp.put_f32_le(*val);
17828        }
17829        __tmp.put_f32_le(self.rollspeed);
17830        __tmp.put_f32_le(self.pitchspeed);
17831        __tmp.put_f32_le(self.yawspeed);
17832        __tmp.put_i32_le(self.lat);
17833        __tmp.put_i32_le(self.lon);
17834        __tmp.put_i32_le(self.alt);
17835        __tmp.put_i16_le(self.vx);
17836        __tmp.put_i16_le(self.vy);
17837        __tmp.put_i16_le(self.vz);
17838        __tmp.put_u16_le(self.ind_airspeed);
17839        __tmp.put_u16_le(self.true_airspeed);
17840        __tmp.put_i16_le(self.xacc);
17841        __tmp.put_i16_le(self.yacc);
17842        __tmp.put_i16_le(self.zacc);
17843        if matches!(version, MavlinkVersion::V2) {
17844            let len = __tmp.len();
17845            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17846        } else {
17847            __tmp.len()
17848        }
17849    }
17850}
17851#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
17852#[doc = ""]
17853#[doc = "ID: 242"]
17854#[derive(Debug, Clone, PartialEq)]
17855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17856#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17857#[cfg_attr(feature = "ts", derive(TS))]
17858#[cfg_attr(feature = "ts", ts(export))]
17859pub struct HOME_POSITION_DATA {
17860    #[doc = "Latitude (WGS84)"]
17861    pub latitude: i32,
17862    #[doc = "Longitude (WGS84)"]
17863    pub longitude: i32,
17864    #[doc = "Altitude (MSL). Positive for up."]
17865    pub altitude: i32,
17866    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
17867    pub x: f32,
17868    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
17869    pub y: f32,
17870    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
17871    pub z: f32,
17872    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
17873    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17874    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17875    pub q: [f32; 4],
17876    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17877    pub approach_x: f32,
17878    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17879    pub approach_y: f32,
17880    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17881    pub approach_z: f32,
17882    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17883    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17884    pub time_usec: u64,
17885}
17886impl HOME_POSITION_DATA {
17887    pub const ENCODED_LEN: usize = 60usize;
17888    pub const DEFAULT: Self = Self {
17889        latitude: 0_i32,
17890        longitude: 0_i32,
17891        altitude: 0_i32,
17892        x: 0.0_f32,
17893        y: 0.0_f32,
17894        z: 0.0_f32,
17895        q: [0.0_f32; 4usize],
17896        approach_x: 0.0_f32,
17897        approach_y: 0.0_f32,
17898        approach_z: 0.0_f32,
17899        time_usec: 0_u64,
17900    };
17901    #[cfg(feature = "arbitrary")]
17902    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17903        use arbitrary::{Arbitrary, Unstructured};
17904        let mut buf = [0u8; 1024];
17905        rng.fill_bytes(&mut buf);
17906        let mut unstructured = Unstructured::new(&buf);
17907        Self::arbitrary(&mut unstructured).unwrap_or_default()
17908    }
17909}
17910impl Default for HOME_POSITION_DATA {
17911    fn default() -> Self {
17912        Self::DEFAULT.clone()
17913    }
17914}
17915impl MessageData for HOME_POSITION_DATA {
17916    type Message = MavMessage;
17917    const ID: u32 = 242u32;
17918    const NAME: &'static str = "HOME_POSITION";
17919    const EXTRA_CRC: u8 = 104u8;
17920    const ENCODED_LEN: usize = 60usize;
17921    fn deser(
17922        _version: MavlinkVersion,
17923        __input: &[u8],
17924    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17925        let avail_len = __input.len();
17926        let mut payload_buf = [0; Self::ENCODED_LEN];
17927        let mut buf = if avail_len < Self::ENCODED_LEN {
17928            payload_buf[0..avail_len].copy_from_slice(__input);
17929            Bytes::new(&payload_buf)
17930        } else {
17931            Bytes::new(__input)
17932        };
17933        let mut __struct = Self::default();
17934        __struct.latitude = buf.get_i32_le();
17935        __struct.longitude = buf.get_i32_le();
17936        __struct.altitude = buf.get_i32_le();
17937        __struct.x = buf.get_f32_le();
17938        __struct.y = buf.get_f32_le();
17939        __struct.z = buf.get_f32_le();
17940        for v in &mut __struct.q {
17941            let val = buf.get_f32_le();
17942            *v = val;
17943        }
17944        __struct.approach_x = buf.get_f32_le();
17945        __struct.approach_y = buf.get_f32_le();
17946        __struct.approach_z = buf.get_f32_le();
17947        __struct.time_usec = buf.get_u64_le();
17948        Ok(__struct)
17949    }
17950    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17951        let mut __tmp = BytesMut::new(bytes);
17952        #[allow(clippy::absurd_extreme_comparisons)]
17953        #[allow(unused_comparisons)]
17954        if __tmp.remaining() < Self::ENCODED_LEN {
17955            panic!(
17956                "buffer is too small (need {} bytes, but got {})",
17957                Self::ENCODED_LEN,
17958                __tmp.remaining(),
17959            )
17960        }
17961        __tmp.put_i32_le(self.latitude);
17962        __tmp.put_i32_le(self.longitude);
17963        __tmp.put_i32_le(self.altitude);
17964        __tmp.put_f32_le(self.x);
17965        __tmp.put_f32_le(self.y);
17966        __tmp.put_f32_le(self.z);
17967        for val in &self.q {
17968            __tmp.put_f32_le(*val);
17969        }
17970        __tmp.put_f32_le(self.approach_x);
17971        __tmp.put_f32_le(self.approach_y);
17972        __tmp.put_f32_le(self.approach_z);
17973        if matches!(version, MavlinkVersion::V2) {
17974            __tmp.put_u64_le(self.time_usec);
17975            let len = __tmp.len();
17976            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17977        } else {
17978            __tmp.len()
17979        }
17980    }
17981}
17982#[doc = "Temperature and humidity from hygrometer."]
17983#[doc = ""]
17984#[doc = "ID: 12920"]
17985#[derive(Debug, Clone, PartialEq)]
17986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17988#[cfg_attr(feature = "ts", derive(TS))]
17989#[cfg_attr(feature = "ts", ts(export))]
17990pub struct HYGROMETER_SENSOR_DATA {
17991    #[doc = "Temperature"]
17992    pub temperature: i16,
17993    #[doc = "Humidity"]
17994    pub humidity: u16,
17995    #[doc = "Hygrometer ID"]
17996    pub id: u8,
17997}
17998impl HYGROMETER_SENSOR_DATA {
17999    pub const ENCODED_LEN: usize = 5usize;
18000    pub const DEFAULT: Self = Self {
18001        temperature: 0_i16,
18002        humidity: 0_u16,
18003        id: 0_u8,
18004    };
18005    #[cfg(feature = "arbitrary")]
18006    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18007        use arbitrary::{Arbitrary, Unstructured};
18008        let mut buf = [0u8; 1024];
18009        rng.fill_bytes(&mut buf);
18010        let mut unstructured = Unstructured::new(&buf);
18011        Self::arbitrary(&mut unstructured).unwrap_or_default()
18012    }
18013}
18014impl Default for HYGROMETER_SENSOR_DATA {
18015    fn default() -> Self {
18016        Self::DEFAULT.clone()
18017    }
18018}
18019impl MessageData for HYGROMETER_SENSOR_DATA {
18020    type Message = MavMessage;
18021    const ID: u32 = 12920u32;
18022    const NAME: &'static str = "HYGROMETER_SENSOR";
18023    const EXTRA_CRC: u8 = 20u8;
18024    const ENCODED_LEN: usize = 5usize;
18025    fn deser(
18026        _version: MavlinkVersion,
18027        __input: &[u8],
18028    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18029        let avail_len = __input.len();
18030        let mut payload_buf = [0; Self::ENCODED_LEN];
18031        let mut buf = if avail_len < Self::ENCODED_LEN {
18032            payload_buf[0..avail_len].copy_from_slice(__input);
18033            Bytes::new(&payload_buf)
18034        } else {
18035            Bytes::new(__input)
18036        };
18037        let mut __struct = Self::default();
18038        __struct.temperature = buf.get_i16_le();
18039        __struct.humidity = buf.get_u16_le();
18040        __struct.id = buf.get_u8();
18041        Ok(__struct)
18042    }
18043    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18044        let mut __tmp = BytesMut::new(bytes);
18045        #[allow(clippy::absurd_extreme_comparisons)]
18046        #[allow(unused_comparisons)]
18047        if __tmp.remaining() < Self::ENCODED_LEN {
18048            panic!(
18049                "buffer is too small (need {} bytes, but got {})",
18050                Self::ENCODED_LEN,
18051                __tmp.remaining(),
18052            )
18053        }
18054        __tmp.put_i16_le(self.temperature);
18055        __tmp.put_u16_le(self.humidity);
18056        __tmp.put_u8(self.id);
18057        if matches!(version, MavlinkVersion::V2) {
18058            let len = __tmp.len();
18059            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18060        } else {
18061            __tmp.len()
18062        }
18063    }
18064}
18065#[doc = "Illuminator status."]
18066#[doc = ""]
18067#[doc = "ID: 440"]
18068#[derive(Debug, Clone, PartialEq)]
18069#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18070#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18071#[cfg_attr(feature = "ts", derive(TS))]
18072#[cfg_attr(feature = "ts", ts(export))]
18073pub struct ILLUMINATOR_STATUS_DATA {
18074    #[doc = "Time since the start-up of the illuminator in ms"]
18075    pub uptime_ms: u32,
18076    #[doc = "Errors"]
18077    pub error_status: IlluminatorErrorFlags,
18078    #[doc = "Illuminator brightness"]
18079    pub brightness: f32,
18080    #[doc = "Illuminator strobing period in seconds"]
18081    pub strobe_period: f32,
18082    #[doc = "Illuminator strobing duty cycle"]
18083    pub strobe_duty_cycle: f32,
18084    #[doc = "Temperature in Celsius"]
18085    pub temp_c: f32,
18086    #[doc = "Minimum strobing period in seconds"]
18087    pub min_strobe_period: f32,
18088    #[doc = "Maximum strobing period in seconds"]
18089    pub max_strobe_period: f32,
18090    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
18091    pub enable: u8,
18092    #[doc = "Supported illuminator modes"]
18093    pub mode_bitmask: IlluminatorMode,
18094    #[doc = "Illuminator mode"]
18095    pub mode: IlluminatorMode,
18096}
18097impl ILLUMINATOR_STATUS_DATA {
18098    pub const ENCODED_LEN: usize = 35usize;
18099    pub const DEFAULT: Self = Self {
18100        uptime_ms: 0_u32,
18101        error_status: IlluminatorErrorFlags::DEFAULT,
18102        brightness: 0.0_f32,
18103        strobe_period: 0.0_f32,
18104        strobe_duty_cycle: 0.0_f32,
18105        temp_c: 0.0_f32,
18106        min_strobe_period: 0.0_f32,
18107        max_strobe_period: 0.0_f32,
18108        enable: 0_u8,
18109        mode_bitmask: IlluminatorMode::DEFAULT,
18110        mode: IlluminatorMode::DEFAULT,
18111    };
18112    #[cfg(feature = "arbitrary")]
18113    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18114        use arbitrary::{Arbitrary, Unstructured};
18115        let mut buf = [0u8; 1024];
18116        rng.fill_bytes(&mut buf);
18117        let mut unstructured = Unstructured::new(&buf);
18118        Self::arbitrary(&mut unstructured).unwrap_or_default()
18119    }
18120}
18121impl Default for ILLUMINATOR_STATUS_DATA {
18122    fn default() -> Self {
18123        Self::DEFAULT.clone()
18124    }
18125}
18126impl MessageData for ILLUMINATOR_STATUS_DATA {
18127    type Message = MavMessage;
18128    const ID: u32 = 440u32;
18129    const NAME: &'static str = "ILLUMINATOR_STATUS";
18130    const EXTRA_CRC: u8 = 66u8;
18131    const ENCODED_LEN: usize = 35usize;
18132    fn deser(
18133        _version: MavlinkVersion,
18134        __input: &[u8],
18135    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18136        let avail_len = __input.len();
18137        let mut payload_buf = [0; Self::ENCODED_LEN];
18138        let mut buf = if avail_len < Self::ENCODED_LEN {
18139            payload_buf[0..avail_len].copy_from_slice(__input);
18140            Bytes::new(&payload_buf)
18141        } else {
18142            Bytes::new(__input)
18143        };
18144        let mut __struct = Self::default();
18145        __struct.uptime_ms = buf.get_u32_le();
18146        let tmp = buf.get_u32_le();
18147        __struct.error_status = IlluminatorErrorFlags::from_bits(
18148            tmp as <IlluminatorErrorFlags as Flags>::Bits,
18149        )
18150        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
18151            flag_type: "IlluminatorErrorFlags",
18152            value: tmp as u64,
18153        })?;
18154        __struct.brightness = buf.get_f32_le();
18155        __struct.strobe_period = buf.get_f32_le();
18156        __struct.strobe_duty_cycle = buf.get_f32_le();
18157        __struct.temp_c = buf.get_f32_le();
18158        __struct.min_strobe_period = buf.get_f32_le();
18159        __struct.max_strobe_period = buf.get_f32_le();
18160        __struct.enable = buf.get_u8();
18161        let tmp = buf.get_u8();
18162        __struct.mode_bitmask =
18163            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18164                enum_type: "IlluminatorMode",
18165                value: tmp as u64,
18166            })?;
18167        let tmp = buf.get_u8();
18168        __struct.mode =
18169            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18170                enum_type: "IlluminatorMode",
18171                value: tmp as u64,
18172            })?;
18173        Ok(__struct)
18174    }
18175    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18176        let mut __tmp = BytesMut::new(bytes);
18177        #[allow(clippy::absurd_extreme_comparisons)]
18178        #[allow(unused_comparisons)]
18179        if __tmp.remaining() < Self::ENCODED_LEN {
18180            panic!(
18181                "buffer is too small (need {} bytes, but got {})",
18182                Self::ENCODED_LEN,
18183                __tmp.remaining(),
18184            )
18185        }
18186        __tmp.put_u32_le(self.uptime_ms);
18187        __tmp.put_u32_le(self.error_status.bits() as u32);
18188        __tmp.put_f32_le(self.brightness);
18189        __tmp.put_f32_le(self.strobe_period);
18190        __tmp.put_f32_le(self.strobe_duty_cycle);
18191        __tmp.put_f32_le(self.temp_c);
18192        __tmp.put_f32_le(self.min_strobe_period);
18193        __tmp.put_f32_le(self.max_strobe_period);
18194        __tmp.put_u8(self.enable);
18195        __tmp.put_u8(self.mode_bitmask as u8);
18196        __tmp.put_u8(self.mode as u8);
18197        if matches!(version, MavlinkVersion::V2) {
18198            let len = __tmp.len();
18199            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18200        } else {
18201            __tmp.len()
18202        }
18203    }
18204}
18205#[doc = "Status of the Iridium SBD link."]
18206#[doc = ""]
18207#[doc = "ID: 335"]
18208#[derive(Debug, Clone, PartialEq)]
18209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18211#[cfg_attr(feature = "ts", derive(TS))]
18212#[cfg_attr(feature = "ts", ts(export))]
18213pub struct ISBD_LINK_STATUS_DATA {
18214    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18215    pub timestamp: u64,
18216    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18217    pub last_heartbeat: u64,
18218    #[doc = "Number of failed SBD sessions."]
18219    pub failed_sessions: u16,
18220    #[doc = "Number of successful SBD sessions."]
18221    pub successful_sessions: u16,
18222    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
18223    pub signal_quality: u8,
18224    #[doc = "1: Ring call pending, 0: No call pending."]
18225    pub ring_pending: u8,
18226    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
18227    pub tx_session_pending: u8,
18228    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
18229    pub rx_session_pending: u8,
18230}
18231impl ISBD_LINK_STATUS_DATA {
18232    pub const ENCODED_LEN: usize = 24usize;
18233    pub const DEFAULT: Self = Self {
18234        timestamp: 0_u64,
18235        last_heartbeat: 0_u64,
18236        failed_sessions: 0_u16,
18237        successful_sessions: 0_u16,
18238        signal_quality: 0_u8,
18239        ring_pending: 0_u8,
18240        tx_session_pending: 0_u8,
18241        rx_session_pending: 0_u8,
18242    };
18243    #[cfg(feature = "arbitrary")]
18244    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18245        use arbitrary::{Arbitrary, Unstructured};
18246        let mut buf = [0u8; 1024];
18247        rng.fill_bytes(&mut buf);
18248        let mut unstructured = Unstructured::new(&buf);
18249        Self::arbitrary(&mut unstructured).unwrap_or_default()
18250    }
18251}
18252impl Default for ISBD_LINK_STATUS_DATA {
18253    fn default() -> Self {
18254        Self::DEFAULT.clone()
18255    }
18256}
18257impl MessageData for ISBD_LINK_STATUS_DATA {
18258    type Message = MavMessage;
18259    const ID: u32 = 335u32;
18260    const NAME: &'static str = "ISBD_LINK_STATUS";
18261    const EXTRA_CRC: u8 = 225u8;
18262    const ENCODED_LEN: usize = 24usize;
18263    fn deser(
18264        _version: MavlinkVersion,
18265        __input: &[u8],
18266    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18267        let avail_len = __input.len();
18268        let mut payload_buf = [0; Self::ENCODED_LEN];
18269        let mut buf = if avail_len < Self::ENCODED_LEN {
18270            payload_buf[0..avail_len].copy_from_slice(__input);
18271            Bytes::new(&payload_buf)
18272        } else {
18273            Bytes::new(__input)
18274        };
18275        let mut __struct = Self::default();
18276        __struct.timestamp = buf.get_u64_le();
18277        __struct.last_heartbeat = buf.get_u64_le();
18278        __struct.failed_sessions = buf.get_u16_le();
18279        __struct.successful_sessions = buf.get_u16_le();
18280        __struct.signal_quality = buf.get_u8();
18281        __struct.ring_pending = buf.get_u8();
18282        __struct.tx_session_pending = buf.get_u8();
18283        __struct.rx_session_pending = buf.get_u8();
18284        Ok(__struct)
18285    }
18286    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18287        let mut __tmp = BytesMut::new(bytes);
18288        #[allow(clippy::absurd_extreme_comparisons)]
18289        #[allow(unused_comparisons)]
18290        if __tmp.remaining() < Self::ENCODED_LEN {
18291            panic!(
18292                "buffer is too small (need {} bytes, but got {})",
18293                Self::ENCODED_LEN,
18294                __tmp.remaining(),
18295            )
18296        }
18297        __tmp.put_u64_le(self.timestamp);
18298        __tmp.put_u64_le(self.last_heartbeat);
18299        __tmp.put_u16_le(self.failed_sessions);
18300        __tmp.put_u16_le(self.successful_sessions);
18301        __tmp.put_u8(self.signal_quality);
18302        __tmp.put_u8(self.ring_pending);
18303        __tmp.put_u8(self.tx_session_pending);
18304        __tmp.put_u8(self.rx_session_pending);
18305        if matches!(version, MavlinkVersion::V2) {
18306            let len = __tmp.len();
18307            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18308        } else {
18309            __tmp.len()
18310        }
18311    }
18312}
18313#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
18314#[doc = ""]
18315#[doc = "ID: 149"]
18316#[derive(Debug, Clone, PartialEq)]
18317#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18318#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18319#[cfg_attr(feature = "ts", derive(TS))]
18320#[cfg_attr(feature = "ts", ts(export))]
18321pub struct LANDING_TARGET_DATA {
18322    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18323    pub time_usec: u64,
18324    #[doc = "X-axis angular offset of the target from the center of the image"]
18325    pub angle_x: f32,
18326    #[doc = "Y-axis angular offset of the target from the center of the image"]
18327    pub angle_y: f32,
18328    #[doc = "Distance to the target from the vehicle"]
18329    pub distance: f32,
18330    #[doc = "Size of target along x-axis"]
18331    pub size_x: f32,
18332    #[doc = "Size of target along y-axis"]
18333    pub size_y: f32,
18334    #[doc = "The ID of the target if multiple targets are present"]
18335    pub target_num: u8,
18336    #[doc = "Coordinate frame used for following fields."]
18337    pub frame: MavFrame,
18338    #[doc = "X Position of the landing target in MAV_FRAME"]
18339    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18340    pub x: f32,
18341    #[doc = "Y Position of the landing target in MAV_FRAME"]
18342    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18343    pub y: f32,
18344    #[doc = "Z Position of the landing target in MAV_FRAME"]
18345    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18346    pub z: f32,
18347    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
18348    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18349    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18350    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18351    pub q: [f32; 4],
18352    #[doc = "Type of landing target"]
18353    #[cfg_attr(feature = "serde", serde(default))]
18354    pub mavtype: LandingTargetType,
18355    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
18356    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18357    pub position_valid: u8,
18358}
18359impl LANDING_TARGET_DATA {
18360    pub const ENCODED_LEN: usize = 60usize;
18361    pub const DEFAULT: Self = Self {
18362        time_usec: 0_u64,
18363        angle_x: 0.0_f32,
18364        angle_y: 0.0_f32,
18365        distance: 0.0_f32,
18366        size_x: 0.0_f32,
18367        size_y: 0.0_f32,
18368        target_num: 0_u8,
18369        frame: MavFrame::DEFAULT,
18370        x: 0.0_f32,
18371        y: 0.0_f32,
18372        z: 0.0_f32,
18373        q: [0.0_f32; 4usize],
18374        mavtype: LandingTargetType::DEFAULT,
18375        position_valid: 0_u8,
18376    };
18377    #[cfg(feature = "arbitrary")]
18378    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18379        use arbitrary::{Arbitrary, Unstructured};
18380        let mut buf = [0u8; 1024];
18381        rng.fill_bytes(&mut buf);
18382        let mut unstructured = Unstructured::new(&buf);
18383        Self::arbitrary(&mut unstructured).unwrap_or_default()
18384    }
18385}
18386impl Default for LANDING_TARGET_DATA {
18387    fn default() -> Self {
18388        Self::DEFAULT.clone()
18389    }
18390}
18391impl MessageData for LANDING_TARGET_DATA {
18392    type Message = MavMessage;
18393    const ID: u32 = 149u32;
18394    const NAME: &'static str = "LANDING_TARGET";
18395    const EXTRA_CRC: u8 = 200u8;
18396    const ENCODED_LEN: usize = 60usize;
18397    fn deser(
18398        _version: MavlinkVersion,
18399        __input: &[u8],
18400    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18401        let avail_len = __input.len();
18402        let mut payload_buf = [0; Self::ENCODED_LEN];
18403        let mut buf = if avail_len < Self::ENCODED_LEN {
18404            payload_buf[0..avail_len].copy_from_slice(__input);
18405            Bytes::new(&payload_buf)
18406        } else {
18407            Bytes::new(__input)
18408        };
18409        let mut __struct = Self::default();
18410        __struct.time_usec = buf.get_u64_le();
18411        __struct.angle_x = buf.get_f32_le();
18412        __struct.angle_y = buf.get_f32_le();
18413        __struct.distance = buf.get_f32_le();
18414        __struct.size_x = buf.get_f32_le();
18415        __struct.size_y = buf.get_f32_le();
18416        __struct.target_num = buf.get_u8();
18417        let tmp = buf.get_u8();
18418        __struct.frame =
18419            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18420                enum_type: "MavFrame",
18421                value: tmp as u64,
18422            })?;
18423        __struct.x = buf.get_f32_le();
18424        __struct.y = buf.get_f32_le();
18425        __struct.z = buf.get_f32_le();
18426        for v in &mut __struct.q {
18427            let val = buf.get_f32_le();
18428            *v = val;
18429        }
18430        let tmp = buf.get_u8();
18431        __struct.mavtype =
18432            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18433                enum_type: "LandingTargetType",
18434                value: tmp as u64,
18435            })?;
18436        __struct.position_valid = buf.get_u8();
18437        Ok(__struct)
18438    }
18439    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18440        let mut __tmp = BytesMut::new(bytes);
18441        #[allow(clippy::absurd_extreme_comparisons)]
18442        #[allow(unused_comparisons)]
18443        if __tmp.remaining() < Self::ENCODED_LEN {
18444            panic!(
18445                "buffer is too small (need {} bytes, but got {})",
18446                Self::ENCODED_LEN,
18447                __tmp.remaining(),
18448            )
18449        }
18450        __tmp.put_u64_le(self.time_usec);
18451        __tmp.put_f32_le(self.angle_x);
18452        __tmp.put_f32_le(self.angle_y);
18453        __tmp.put_f32_le(self.distance);
18454        __tmp.put_f32_le(self.size_x);
18455        __tmp.put_f32_le(self.size_y);
18456        __tmp.put_u8(self.target_num);
18457        __tmp.put_u8(self.frame as u8);
18458        if matches!(version, MavlinkVersion::V2) {
18459            __tmp.put_f32_le(self.x);
18460            __tmp.put_f32_le(self.y);
18461            __tmp.put_f32_le(self.z);
18462            for val in &self.q {
18463                __tmp.put_f32_le(*val);
18464            }
18465            __tmp.put_u8(self.mavtype as u8);
18466            __tmp.put_u8(self.position_valid);
18467            let len = __tmp.len();
18468            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18469        } else {
18470            __tmp.len()
18471        }
18472    }
18473}
18474#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
18475#[doc = ""]
18476#[doc = "ID: 8"]
18477#[derive(Debug, Clone, PartialEq)]
18478#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18479#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18480#[cfg_attr(feature = "ts", derive(TS))]
18481#[cfg_attr(feature = "ts", ts(export))]
18482pub struct LINK_NODE_STATUS_DATA {
18483    #[doc = "Timestamp (time since system boot)."]
18484    pub timestamp: u64,
18485    #[doc = "Transmit rate"]
18486    pub tx_rate: u32,
18487    #[doc = "Receive rate"]
18488    pub rx_rate: u32,
18489    #[doc = "Messages sent"]
18490    pub messages_sent: u32,
18491    #[doc = "Messages received (estimated from counting seq)"]
18492    pub messages_received: u32,
18493    #[doc = "Messages lost (estimated from counting seq)"]
18494    pub messages_lost: u32,
18495    #[doc = "Number of bytes that could not be parsed correctly."]
18496    pub rx_parse_err: u16,
18497    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18498    pub tx_overflows: u16,
18499    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18500    pub rx_overflows: u16,
18501    #[doc = "Remaining free transmit buffer space"]
18502    pub tx_buf: u8,
18503    #[doc = "Remaining free receive buffer space"]
18504    pub rx_buf: u8,
18505}
18506impl LINK_NODE_STATUS_DATA {
18507    pub const ENCODED_LEN: usize = 36usize;
18508    pub const DEFAULT: Self = Self {
18509        timestamp: 0_u64,
18510        tx_rate: 0_u32,
18511        rx_rate: 0_u32,
18512        messages_sent: 0_u32,
18513        messages_received: 0_u32,
18514        messages_lost: 0_u32,
18515        rx_parse_err: 0_u16,
18516        tx_overflows: 0_u16,
18517        rx_overflows: 0_u16,
18518        tx_buf: 0_u8,
18519        rx_buf: 0_u8,
18520    };
18521    #[cfg(feature = "arbitrary")]
18522    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18523        use arbitrary::{Arbitrary, Unstructured};
18524        let mut buf = [0u8; 1024];
18525        rng.fill_bytes(&mut buf);
18526        let mut unstructured = Unstructured::new(&buf);
18527        Self::arbitrary(&mut unstructured).unwrap_or_default()
18528    }
18529}
18530impl Default for LINK_NODE_STATUS_DATA {
18531    fn default() -> Self {
18532        Self::DEFAULT.clone()
18533    }
18534}
18535impl MessageData for LINK_NODE_STATUS_DATA {
18536    type Message = MavMessage;
18537    const ID: u32 = 8u32;
18538    const NAME: &'static str = "LINK_NODE_STATUS";
18539    const EXTRA_CRC: u8 = 117u8;
18540    const ENCODED_LEN: usize = 36usize;
18541    fn deser(
18542        _version: MavlinkVersion,
18543        __input: &[u8],
18544    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18545        let avail_len = __input.len();
18546        let mut payload_buf = [0; Self::ENCODED_LEN];
18547        let mut buf = if avail_len < Self::ENCODED_LEN {
18548            payload_buf[0..avail_len].copy_from_slice(__input);
18549            Bytes::new(&payload_buf)
18550        } else {
18551            Bytes::new(__input)
18552        };
18553        let mut __struct = Self::default();
18554        __struct.timestamp = buf.get_u64_le();
18555        __struct.tx_rate = buf.get_u32_le();
18556        __struct.rx_rate = buf.get_u32_le();
18557        __struct.messages_sent = buf.get_u32_le();
18558        __struct.messages_received = buf.get_u32_le();
18559        __struct.messages_lost = buf.get_u32_le();
18560        __struct.rx_parse_err = buf.get_u16_le();
18561        __struct.tx_overflows = buf.get_u16_le();
18562        __struct.rx_overflows = buf.get_u16_le();
18563        __struct.tx_buf = buf.get_u8();
18564        __struct.rx_buf = buf.get_u8();
18565        Ok(__struct)
18566    }
18567    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18568        let mut __tmp = BytesMut::new(bytes);
18569        #[allow(clippy::absurd_extreme_comparisons)]
18570        #[allow(unused_comparisons)]
18571        if __tmp.remaining() < Self::ENCODED_LEN {
18572            panic!(
18573                "buffer is too small (need {} bytes, but got {})",
18574                Self::ENCODED_LEN,
18575                __tmp.remaining(),
18576            )
18577        }
18578        __tmp.put_u64_le(self.timestamp);
18579        __tmp.put_u32_le(self.tx_rate);
18580        __tmp.put_u32_le(self.rx_rate);
18581        __tmp.put_u32_le(self.messages_sent);
18582        __tmp.put_u32_le(self.messages_received);
18583        __tmp.put_u32_le(self.messages_lost);
18584        __tmp.put_u16_le(self.rx_parse_err);
18585        __tmp.put_u16_le(self.tx_overflows);
18586        __tmp.put_u16_le(self.rx_overflows);
18587        __tmp.put_u8(self.tx_buf);
18588        __tmp.put_u8(self.rx_buf);
18589        if matches!(version, MavlinkVersion::V2) {
18590            let len = __tmp.len();
18591            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18592        } else {
18593            __tmp.len()
18594        }
18595    }
18596}
18597#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18598#[doc = ""]
18599#[doc = "ID: 32"]
18600#[derive(Debug, Clone, PartialEq)]
18601#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18602#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18603#[cfg_attr(feature = "ts", derive(TS))]
18604#[cfg_attr(feature = "ts", ts(export))]
18605pub struct LOCAL_POSITION_NED_DATA {
18606    #[doc = "Timestamp (time since system boot)."]
18607    pub time_boot_ms: u32,
18608    #[doc = "X Position"]
18609    pub x: f32,
18610    #[doc = "Y Position"]
18611    pub y: f32,
18612    #[doc = "Z Position"]
18613    pub z: f32,
18614    #[doc = "X Speed"]
18615    pub vx: f32,
18616    #[doc = "Y Speed"]
18617    pub vy: f32,
18618    #[doc = "Z Speed"]
18619    pub vz: f32,
18620}
18621impl LOCAL_POSITION_NED_DATA {
18622    pub const ENCODED_LEN: usize = 28usize;
18623    pub const DEFAULT: Self = Self {
18624        time_boot_ms: 0_u32,
18625        x: 0.0_f32,
18626        y: 0.0_f32,
18627        z: 0.0_f32,
18628        vx: 0.0_f32,
18629        vy: 0.0_f32,
18630        vz: 0.0_f32,
18631    };
18632    #[cfg(feature = "arbitrary")]
18633    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18634        use arbitrary::{Arbitrary, Unstructured};
18635        let mut buf = [0u8; 1024];
18636        rng.fill_bytes(&mut buf);
18637        let mut unstructured = Unstructured::new(&buf);
18638        Self::arbitrary(&mut unstructured).unwrap_or_default()
18639    }
18640}
18641impl Default for LOCAL_POSITION_NED_DATA {
18642    fn default() -> Self {
18643        Self::DEFAULT.clone()
18644    }
18645}
18646impl MessageData for LOCAL_POSITION_NED_DATA {
18647    type Message = MavMessage;
18648    const ID: u32 = 32u32;
18649    const NAME: &'static str = "LOCAL_POSITION_NED";
18650    const EXTRA_CRC: u8 = 185u8;
18651    const ENCODED_LEN: usize = 28usize;
18652    fn deser(
18653        _version: MavlinkVersion,
18654        __input: &[u8],
18655    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18656        let avail_len = __input.len();
18657        let mut payload_buf = [0; Self::ENCODED_LEN];
18658        let mut buf = if avail_len < Self::ENCODED_LEN {
18659            payload_buf[0..avail_len].copy_from_slice(__input);
18660            Bytes::new(&payload_buf)
18661        } else {
18662            Bytes::new(__input)
18663        };
18664        let mut __struct = Self::default();
18665        __struct.time_boot_ms = buf.get_u32_le();
18666        __struct.x = buf.get_f32_le();
18667        __struct.y = buf.get_f32_le();
18668        __struct.z = buf.get_f32_le();
18669        __struct.vx = buf.get_f32_le();
18670        __struct.vy = buf.get_f32_le();
18671        __struct.vz = buf.get_f32_le();
18672        Ok(__struct)
18673    }
18674    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18675        let mut __tmp = BytesMut::new(bytes);
18676        #[allow(clippy::absurd_extreme_comparisons)]
18677        #[allow(unused_comparisons)]
18678        if __tmp.remaining() < Self::ENCODED_LEN {
18679            panic!(
18680                "buffer is too small (need {} bytes, but got {})",
18681                Self::ENCODED_LEN,
18682                __tmp.remaining(),
18683            )
18684        }
18685        __tmp.put_u32_le(self.time_boot_ms);
18686        __tmp.put_f32_le(self.x);
18687        __tmp.put_f32_le(self.y);
18688        __tmp.put_f32_le(self.z);
18689        __tmp.put_f32_le(self.vx);
18690        __tmp.put_f32_le(self.vy);
18691        __tmp.put_f32_le(self.vz);
18692        if matches!(version, MavlinkVersion::V2) {
18693            let len = __tmp.len();
18694            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18695        } else {
18696            __tmp.len()
18697        }
18698    }
18699}
18700#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18701#[doc = ""]
18702#[doc = "ID: 64"]
18703#[derive(Debug, Clone, PartialEq)]
18704#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18705#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18706#[cfg_attr(feature = "ts", derive(TS))]
18707#[cfg_attr(feature = "ts", ts(export))]
18708pub struct LOCAL_POSITION_NED_COV_DATA {
18709    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18710    pub time_usec: u64,
18711    #[doc = "X Position"]
18712    pub x: f32,
18713    #[doc = "Y Position"]
18714    pub y: f32,
18715    #[doc = "Z Position"]
18716    pub z: f32,
18717    #[doc = "X Speed"]
18718    pub vx: f32,
18719    #[doc = "Y Speed"]
18720    pub vy: f32,
18721    #[doc = "Z Speed"]
18722    pub vz: f32,
18723    #[doc = "X Acceleration"]
18724    pub ax: f32,
18725    #[doc = "Y Acceleration"]
18726    pub ay: f32,
18727    #[doc = "Z Acceleration"]
18728    pub az: f32,
18729    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
18730    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18731    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18732    pub covariance: [f32; 45],
18733    #[doc = "Class id of the estimator this estimate originated from."]
18734    pub estimator_type: MavEstimatorType,
18735}
18736impl LOCAL_POSITION_NED_COV_DATA {
18737    pub const ENCODED_LEN: usize = 225usize;
18738    pub const DEFAULT: Self = Self {
18739        time_usec: 0_u64,
18740        x: 0.0_f32,
18741        y: 0.0_f32,
18742        z: 0.0_f32,
18743        vx: 0.0_f32,
18744        vy: 0.0_f32,
18745        vz: 0.0_f32,
18746        ax: 0.0_f32,
18747        ay: 0.0_f32,
18748        az: 0.0_f32,
18749        covariance: [0.0_f32; 45usize],
18750        estimator_type: MavEstimatorType::DEFAULT,
18751    };
18752    #[cfg(feature = "arbitrary")]
18753    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18754        use arbitrary::{Arbitrary, Unstructured};
18755        let mut buf = [0u8; 1024];
18756        rng.fill_bytes(&mut buf);
18757        let mut unstructured = Unstructured::new(&buf);
18758        Self::arbitrary(&mut unstructured).unwrap_or_default()
18759    }
18760}
18761impl Default for LOCAL_POSITION_NED_COV_DATA {
18762    fn default() -> Self {
18763        Self::DEFAULT.clone()
18764    }
18765}
18766impl MessageData for LOCAL_POSITION_NED_COV_DATA {
18767    type Message = MavMessage;
18768    const ID: u32 = 64u32;
18769    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
18770    const EXTRA_CRC: u8 = 191u8;
18771    const ENCODED_LEN: usize = 225usize;
18772    fn deser(
18773        _version: MavlinkVersion,
18774        __input: &[u8],
18775    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18776        let avail_len = __input.len();
18777        let mut payload_buf = [0; Self::ENCODED_LEN];
18778        let mut buf = if avail_len < Self::ENCODED_LEN {
18779            payload_buf[0..avail_len].copy_from_slice(__input);
18780            Bytes::new(&payload_buf)
18781        } else {
18782            Bytes::new(__input)
18783        };
18784        let mut __struct = Self::default();
18785        __struct.time_usec = buf.get_u64_le();
18786        __struct.x = buf.get_f32_le();
18787        __struct.y = buf.get_f32_le();
18788        __struct.z = buf.get_f32_le();
18789        __struct.vx = buf.get_f32_le();
18790        __struct.vy = buf.get_f32_le();
18791        __struct.vz = buf.get_f32_le();
18792        __struct.ax = buf.get_f32_le();
18793        __struct.ay = buf.get_f32_le();
18794        __struct.az = buf.get_f32_le();
18795        for v in &mut __struct.covariance {
18796            let val = buf.get_f32_le();
18797            *v = val;
18798        }
18799        let tmp = buf.get_u8();
18800        __struct.estimator_type =
18801            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18802                enum_type: "MavEstimatorType",
18803                value: tmp as u64,
18804            })?;
18805        Ok(__struct)
18806    }
18807    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18808        let mut __tmp = BytesMut::new(bytes);
18809        #[allow(clippy::absurd_extreme_comparisons)]
18810        #[allow(unused_comparisons)]
18811        if __tmp.remaining() < Self::ENCODED_LEN {
18812            panic!(
18813                "buffer is too small (need {} bytes, but got {})",
18814                Self::ENCODED_LEN,
18815                __tmp.remaining(),
18816            )
18817        }
18818        __tmp.put_u64_le(self.time_usec);
18819        __tmp.put_f32_le(self.x);
18820        __tmp.put_f32_le(self.y);
18821        __tmp.put_f32_le(self.z);
18822        __tmp.put_f32_le(self.vx);
18823        __tmp.put_f32_le(self.vy);
18824        __tmp.put_f32_le(self.vz);
18825        __tmp.put_f32_le(self.ax);
18826        __tmp.put_f32_le(self.ay);
18827        __tmp.put_f32_le(self.az);
18828        for val in &self.covariance {
18829            __tmp.put_f32_le(*val);
18830        }
18831        __tmp.put_u8(self.estimator_type as u8);
18832        if matches!(version, MavlinkVersion::V2) {
18833            let len = __tmp.len();
18834            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18835        } else {
18836            __tmp.len()
18837        }
18838    }
18839}
18840#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18841#[doc = ""]
18842#[doc = "ID: 89"]
18843#[derive(Debug, Clone, PartialEq)]
18844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18845#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18846#[cfg_attr(feature = "ts", derive(TS))]
18847#[cfg_attr(feature = "ts", ts(export))]
18848pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18849    #[doc = "Timestamp (time since system boot)."]
18850    pub time_boot_ms: u32,
18851    #[doc = "X Position"]
18852    pub x: f32,
18853    #[doc = "Y Position"]
18854    pub y: f32,
18855    #[doc = "Z Position"]
18856    pub z: f32,
18857    #[doc = "Roll"]
18858    pub roll: f32,
18859    #[doc = "Pitch"]
18860    pub pitch: f32,
18861    #[doc = "Yaw"]
18862    pub yaw: f32,
18863}
18864impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18865    pub const ENCODED_LEN: usize = 28usize;
18866    pub const DEFAULT: Self = Self {
18867        time_boot_ms: 0_u32,
18868        x: 0.0_f32,
18869        y: 0.0_f32,
18870        z: 0.0_f32,
18871        roll: 0.0_f32,
18872        pitch: 0.0_f32,
18873        yaw: 0.0_f32,
18874    };
18875    #[cfg(feature = "arbitrary")]
18876    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18877        use arbitrary::{Arbitrary, Unstructured};
18878        let mut buf = [0u8; 1024];
18879        rng.fill_bytes(&mut buf);
18880        let mut unstructured = Unstructured::new(&buf);
18881        Self::arbitrary(&mut unstructured).unwrap_or_default()
18882    }
18883}
18884impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18885    fn default() -> Self {
18886        Self::DEFAULT.clone()
18887    }
18888}
18889impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18890    type Message = MavMessage;
18891    const ID: u32 = 89u32;
18892    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
18893    const EXTRA_CRC: u8 = 231u8;
18894    const ENCODED_LEN: usize = 28usize;
18895    fn deser(
18896        _version: MavlinkVersion,
18897        __input: &[u8],
18898    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18899        let avail_len = __input.len();
18900        let mut payload_buf = [0; Self::ENCODED_LEN];
18901        let mut buf = if avail_len < Self::ENCODED_LEN {
18902            payload_buf[0..avail_len].copy_from_slice(__input);
18903            Bytes::new(&payload_buf)
18904        } else {
18905            Bytes::new(__input)
18906        };
18907        let mut __struct = Self::default();
18908        __struct.time_boot_ms = buf.get_u32_le();
18909        __struct.x = buf.get_f32_le();
18910        __struct.y = buf.get_f32_le();
18911        __struct.z = buf.get_f32_le();
18912        __struct.roll = buf.get_f32_le();
18913        __struct.pitch = buf.get_f32_le();
18914        __struct.yaw = buf.get_f32_le();
18915        Ok(__struct)
18916    }
18917    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18918        let mut __tmp = BytesMut::new(bytes);
18919        #[allow(clippy::absurd_extreme_comparisons)]
18920        #[allow(unused_comparisons)]
18921        if __tmp.remaining() < Self::ENCODED_LEN {
18922            panic!(
18923                "buffer is too small (need {} bytes, but got {})",
18924                Self::ENCODED_LEN,
18925                __tmp.remaining(),
18926            )
18927        }
18928        __tmp.put_u32_le(self.time_boot_ms);
18929        __tmp.put_f32_le(self.x);
18930        __tmp.put_f32_le(self.y);
18931        __tmp.put_f32_le(self.z);
18932        __tmp.put_f32_le(self.roll);
18933        __tmp.put_f32_le(self.pitch);
18934        __tmp.put_f32_le(self.yaw);
18935        if matches!(version, MavlinkVersion::V2) {
18936            let len = __tmp.len();
18937            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18938        } else {
18939            __tmp.len()
18940        }
18941    }
18942}
18943#[doc = "An ack for a LOGGING_DATA_ACKED message."]
18944#[doc = ""]
18945#[doc = "ID: 268"]
18946#[derive(Debug, Clone, PartialEq)]
18947#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18948#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18949#[cfg_attr(feature = "ts", derive(TS))]
18950#[cfg_attr(feature = "ts", ts(export))]
18951pub struct LOGGING_ACK_DATA {
18952    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
18953    pub sequence: u16,
18954    #[doc = "system ID of the target"]
18955    pub target_system: u8,
18956    #[doc = "component ID of the target"]
18957    pub target_component: u8,
18958}
18959impl LOGGING_ACK_DATA {
18960    pub const ENCODED_LEN: usize = 4usize;
18961    pub const DEFAULT: Self = Self {
18962        sequence: 0_u16,
18963        target_system: 0_u8,
18964        target_component: 0_u8,
18965    };
18966    #[cfg(feature = "arbitrary")]
18967    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18968        use arbitrary::{Arbitrary, Unstructured};
18969        let mut buf = [0u8; 1024];
18970        rng.fill_bytes(&mut buf);
18971        let mut unstructured = Unstructured::new(&buf);
18972        Self::arbitrary(&mut unstructured).unwrap_or_default()
18973    }
18974}
18975impl Default for LOGGING_ACK_DATA {
18976    fn default() -> Self {
18977        Self::DEFAULT.clone()
18978    }
18979}
18980impl MessageData for LOGGING_ACK_DATA {
18981    type Message = MavMessage;
18982    const ID: u32 = 268u32;
18983    const NAME: &'static str = "LOGGING_ACK";
18984    const EXTRA_CRC: u8 = 14u8;
18985    const ENCODED_LEN: usize = 4usize;
18986    fn deser(
18987        _version: MavlinkVersion,
18988        __input: &[u8],
18989    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18990        let avail_len = __input.len();
18991        let mut payload_buf = [0; Self::ENCODED_LEN];
18992        let mut buf = if avail_len < Self::ENCODED_LEN {
18993            payload_buf[0..avail_len].copy_from_slice(__input);
18994            Bytes::new(&payload_buf)
18995        } else {
18996            Bytes::new(__input)
18997        };
18998        let mut __struct = Self::default();
18999        __struct.sequence = buf.get_u16_le();
19000        __struct.target_system = buf.get_u8();
19001        __struct.target_component = buf.get_u8();
19002        Ok(__struct)
19003    }
19004    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19005        let mut __tmp = BytesMut::new(bytes);
19006        #[allow(clippy::absurd_extreme_comparisons)]
19007        #[allow(unused_comparisons)]
19008        if __tmp.remaining() < Self::ENCODED_LEN {
19009            panic!(
19010                "buffer is too small (need {} bytes, but got {})",
19011                Self::ENCODED_LEN,
19012                __tmp.remaining(),
19013            )
19014        }
19015        __tmp.put_u16_le(self.sequence);
19016        __tmp.put_u8(self.target_system);
19017        __tmp.put_u8(self.target_component);
19018        if matches!(version, MavlinkVersion::V2) {
19019            let len = __tmp.len();
19020            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19021        } else {
19022            __tmp.len()
19023        }
19024    }
19025}
19026#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
19027#[doc = ""]
19028#[doc = "ID: 266"]
19029#[derive(Debug, Clone, PartialEq)]
19030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19031#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19032#[cfg_attr(feature = "ts", derive(TS))]
19033#[cfg_attr(feature = "ts", ts(export))]
19034pub struct LOGGING_DATA_DATA {
19035    #[doc = "sequence number (can wrap)"]
19036    pub sequence: u16,
19037    #[doc = "system ID of the target"]
19038    pub target_system: u8,
19039    #[doc = "component ID of the target"]
19040    pub target_component: u8,
19041    #[doc = "data length"]
19042    pub length: u8,
19043    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
19044    pub first_message_offset: u8,
19045    #[doc = "logged data"]
19046    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19047    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19048    pub data: [u8; 249],
19049}
19050impl LOGGING_DATA_DATA {
19051    pub const ENCODED_LEN: usize = 255usize;
19052    pub const DEFAULT: Self = Self {
19053        sequence: 0_u16,
19054        target_system: 0_u8,
19055        target_component: 0_u8,
19056        length: 0_u8,
19057        first_message_offset: 0_u8,
19058        data: [0_u8; 249usize],
19059    };
19060    #[cfg(feature = "arbitrary")]
19061    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19062        use arbitrary::{Arbitrary, Unstructured};
19063        let mut buf = [0u8; 1024];
19064        rng.fill_bytes(&mut buf);
19065        let mut unstructured = Unstructured::new(&buf);
19066        Self::arbitrary(&mut unstructured).unwrap_or_default()
19067    }
19068}
19069impl Default for LOGGING_DATA_DATA {
19070    fn default() -> Self {
19071        Self::DEFAULT.clone()
19072    }
19073}
19074impl MessageData for LOGGING_DATA_DATA {
19075    type Message = MavMessage;
19076    const ID: u32 = 266u32;
19077    const NAME: &'static str = "LOGGING_DATA";
19078    const EXTRA_CRC: u8 = 193u8;
19079    const ENCODED_LEN: usize = 255usize;
19080    fn deser(
19081        _version: MavlinkVersion,
19082        __input: &[u8],
19083    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19084        let avail_len = __input.len();
19085        let mut payload_buf = [0; Self::ENCODED_LEN];
19086        let mut buf = if avail_len < Self::ENCODED_LEN {
19087            payload_buf[0..avail_len].copy_from_slice(__input);
19088            Bytes::new(&payload_buf)
19089        } else {
19090            Bytes::new(__input)
19091        };
19092        let mut __struct = Self::default();
19093        __struct.sequence = buf.get_u16_le();
19094        __struct.target_system = buf.get_u8();
19095        __struct.target_component = buf.get_u8();
19096        __struct.length = buf.get_u8();
19097        __struct.first_message_offset = buf.get_u8();
19098        for v in &mut __struct.data {
19099            let val = buf.get_u8();
19100            *v = val;
19101        }
19102        Ok(__struct)
19103    }
19104    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19105        let mut __tmp = BytesMut::new(bytes);
19106        #[allow(clippy::absurd_extreme_comparisons)]
19107        #[allow(unused_comparisons)]
19108        if __tmp.remaining() < Self::ENCODED_LEN {
19109            panic!(
19110                "buffer is too small (need {} bytes, but got {})",
19111                Self::ENCODED_LEN,
19112                __tmp.remaining(),
19113            )
19114        }
19115        __tmp.put_u16_le(self.sequence);
19116        __tmp.put_u8(self.target_system);
19117        __tmp.put_u8(self.target_component);
19118        __tmp.put_u8(self.length);
19119        __tmp.put_u8(self.first_message_offset);
19120        for val in &self.data {
19121            __tmp.put_u8(*val);
19122        }
19123        if matches!(version, MavlinkVersion::V2) {
19124            let len = __tmp.len();
19125            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19126        } else {
19127            __tmp.len()
19128        }
19129    }
19130}
19131#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
19132#[doc = ""]
19133#[doc = "ID: 267"]
19134#[derive(Debug, Clone, PartialEq)]
19135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19136#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19137#[cfg_attr(feature = "ts", derive(TS))]
19138#[cfg_attr(feature = "ts", ts(export))]
19139pub struct LOGGING_DATA_ACKED_DATA {
19140    #[doc = "sequence number (can wrap)"]
19141    pub sequence: u16,
19142    #[doc = "system ID of the target"]
19143    pub target_system: u8,
19144    #[doc = "component ID of the target"]
19145    pub target_component: u8,
19146    #[doc = "data length"]
19147    pub length: u8,
19148    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
19149    pub first_message_offset: u8,
19150    #[doc = "logged data"]
19151    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19152    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19153    pub data: [u8; 249],
19154}
19155impl LOGGING_DATA_ACKED_DATA {
19156    pub const ENCODED_LEN: usize = 255usize;
19157    pub const DEFAULT: Self = Self {
19158        sequence: 0_u16,
19159        target_system: 0_u8,
19160        target_component: 0_u8,
19161        length: 0_u8,
19162        first_message_offset: 0_u8,
19163        data: [0_u8; 249usize],
19164    };
19165    #[cfg(feature = "arbitrary")]
19166    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19167        use arbitrary::{Arbitrary, Unstructured};
19168        let mut buf = [0u8; 1024];
19169        rng.fill_bytes(&mut buf);
19170        let mut unstructured = Unstructured::new(&buf);
19171        Self::arbitrary(&mut unstructured).unwrap_or_default()
19172    }
19173}
19174impl Default for LOGGING_DATA_ACKED_DATA {
19175    fn default() -> Self {
19176        Self::DEFAULT.clone()
19177    }
19178}
19179impl MessageData for LOGGING_DATA_ACKED_DATA {
19180    type Message = MavMessage;
19181    const ID: u32 = 267u32;
19182    const NAME: &'static str = "LOGGING_DATA_ACKED";
19183    const EXTRA_CRC: u8 = 35u8;
19184    const ENCODED_LEN: usize = 255usize;
19185    fn deser(
19186        _version: MavlinkVersion,
19187        __input: &[u8],
19188    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19189        let avail_len = __input.len();
19190        let mut payload_buf = [0; Self::ENCODED_LEN];
19191        let mut buf = if avail_len < Self::ENCODED_LEN {
19192            payload_buf[0..avail_len].copy_from_slice(__input);
19193            Bytes::new(&payload_buf)
19194        } else {
19195            Bytes::new(__input)
19196        };
19197        let mut __struct = Self::default();
19198        __struct.sequence = buf.get_u16_le();
19199        __struct.target_system = buf.get_u8();
19200        __struct.target_component = buf.get_u8();
19201        __struct.length = buf.get_u8();
19202        __struct.first_message_offset = buf.get_u8();
19203        for v in &mut __struct.data {
19204            let val = buf.get_u8();
19205            *v = val;
19206        }
19207        Ok(__struct)
19208    }
19209    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19210        let mut __tmp = BytesMut::new(bytes);
19211        #[allow(clippy::absurd_extreme_comparisons)]
19212        #[allow(unused_comparisons)]
19213        if __tmp.remaining() < Self::ENCODED_LEN {
19214            panic!(
19215                "buffer is too small (need {} bytes, but got {})",
19216                Self::ENCODED_LEN,
19217                __tmp.remaining(),
19218            )
19219        }
19220        __tmp.put_u16_le(self.sequence);
19221        __tmp.put_u8(self.target_system);
19222        __tmp.put_u8(self.target_component);
19223        __tmp.put_u8(self.length);
19224        __tmp.put_u8(self.first_message_offset);
19225        for val in &self.data {
19226            __tmp.put_u8(*val);
19227        }
19228        if matches!(version, MavlinkVersion::V2) {
19229            let len = __tmp.len();
19230            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19231        } else {
19232            __tmp.len()
19233        }
19234    }
19235}
19236#[doc = "Reply to LOG_REQUEST_DATA."]
19237#[doc = ""]
19238#[doc = "ID: 120"]
19239#[derive(Debug, Clone, PartialEq)]
19240#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19241#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19242#[cfg_attr(feature = "ts", derive(TS))]
19243#[cfg_attr(feature = "ts", ts(export))]
19244pub struct LOG_DATA_DATA {
19245    #[doc = "Offset into the log"]
19246    pub ofs: u32,
19247    #[doc = "Log id (from LOG_ENTRY reply)"]
19248    pub id: u16,
19249    #[doc = "Number of bytes (zero for end of log)"]
19250    pub count: u8,
19251    #[doc = "log data"]
19252    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19253    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19254    pub data: [u8; 90],
19255}
19256impl LOG_DATA_DATA {
19257    pub const ENCODED_LEN: usize = 97usize;
19258    pub const DEFAULT: Self = Self {
19259        ofs: 0_u32,
19260        id: 0_u16,
19261        count: 0_u8,
19262        data: [0_u8; 90usize],
19263    };
19264    #[cfg(feature = "arbitrary")]
19265    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19266        use arbitrary::{Arbitrary, Unstructured};
19267        let mut buf = [0u8; 1024];
19268        rng.fill_bytes(&mut buf);
19269        let mut unstructured = Unstructured::new(&buf);
19270        Self::arbitrary(&mut unstructured).unwrap_or_default()
19271    }
19272}
19273impl Default for LOG_DATA_DATA {
19274    fn default() -> Self {
19275        Self::DEFAULT.clone()
19276    }
19277}
19278impl MessageData for LOG_DATA_DATA {
19279    type Message = MavMessage;
19280    const ID: u32 = 120u32;
19281    const NAME: &'static str = "LOG_DATA";
19282    const EXTRA_CRC: u8 = 134u8;
19283    const ENCODED_LEN: usize = 97usize;
19284    fn deser(
19285        _version: MavlinkVersion,
19286        __input: &[u8],
19287    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19288        let avail_len = __input.len();
19289        let mut payload_buf = [0; Self::ENCODED_LEN];
19290        let mut buf = if avail_len < Self::ENCODED_LEN {
19291            payload_buf[0..avail_len].copy_from_slice(__input);
19292            Bytes::new(&payload_buf)
19293        } else {
19294            Bytes::new(__input)
19295        };
19296        let mut __struct = Self::default();
19297        __struct.ofs = buf.get_u32_le();
19298        __struct.id = buf.get_u16_le();
19299        __struct.count = buf.get_u8();
19300        for v in &mut __struct.data {
19301            let val = buf.get_u8();
19302            *v = val;
19303        }
19304        Ok(__struct)
19305    }
19306    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19307        let mut __tmp = BytesMut::new(bytes);
19308        #[allow(clippy::absurd_extreme_comparisons)]
19309        #[allow(unused_comparisons)]
19310        if __tmp.remaining() < Self::ENCODED_LEN {
19311            panic!(
19312                "buffer is too small (need {} bytes, but got {})",
19313                Self::ENCODED_LEN,
19314                __tmp.remaining(),
19315            )
19316        }
19317        __tmp.put_u32_le(self.ofs);
19318        __tmp.put_u16_le(self.id);
19319        __tmp.put_u8(self.count);
19320        for val in &self.data {
19321            __tmp.put_u8(*val);
19322        }
19323        if matches!(version, MavlinkVersion::V2) {
19324            let len = __tmp.len();
19325            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19326        } else {
19327            __tmp.len()
19328        }
19329    }
19330}
19331#[doc = "Reply to LOG_REQUEST_LIST."]
19332#[doc = ""]
19333#[doc = "ID: 118"]
19334#[derive(Debug, Clone, PartialEq)]
19335#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19336#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19337#[cfg_attr(feature = "ts", derive(TS))]
19338#[cfg_attr(feature = "ts", ts(export))]
19339pub struct LOG_ENTRY_DATA {
19340    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
19341    pub time_utc: u32,
19342    #[doc = "Size of the log (may be approximate)"]
19343    pub size: u32,
19344    #[doc = "Log id"]
19345    pub id: u16,
19346    #[doc = "Total number of logs"]
19347    pub num_logs: u16,
19348    #[doc = "High log number"]
19349    pub last_log_num: u16,
19350}
19351impl LOG_ENTRY_DATA {
19352    pub const ENCODED_LEN: usize = 14usize;
19353    pub const DEFAULT: Self = Self {
19354        time_utc: 0_u32,
19355        size: 0_u32,
19356        id: 0_u16,
19357        num_logs: 0_u16,
19358        last_log_num: 0_u16,
19359    };
19360    #[cfg(feature = "arbitrary")]
19361    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19362        use arbitrary::{Arbitrary, Unstructured};
19363        let mut buf = [0u8; 1024];
19364        rng.fill_bytes(&mut buf);
19365        let mut unstructured = Unstructured::new(&buf);
19366        Self::arbitrary(&mut unstructured).unwrap_or_default()
19367    }
19368}
19369impl Default for LOG_ENTRY_DATA {
19370    fn default() -> Self {
19371        Self::DEFAULT.clone()
19372    }
19373}
19374impl MessageData for LOG_ENTRY_DATA {
19375    type Message = MavMessage;
19376    const ID: u32 = 118u32;
19377    const NAME: &'static str = "LOG_ENTRY";
19378    const EXTRA_CRC: u8 = 56u8;
19379    const ENCODED_LEN: usize = 14usize;
19380    fn deser(
19381        _version: MavlinkVersion,
19382        __input: &[u8],
19383    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19384        let avail_len = __input.len();
19385        let mut payload_buf = [0; Self::ENCODED_LEN];
19386        let mut buf = if avail_len < Self::ENCODED_LEN {
19387            payload_buf[0..avail_len].copy_from_slice(__input);
19388            Bytes::new(&payload_buf)
19389        } else {
19390            Bytes::new(__input)
19391        };
19392        let mut __struct = Self::default();
19393        __struct.time_utc = buf.get_u32_le();
19394        __struct.size = buf.get_u32_le();
19395        __struct.id = buf.get_u16_le();
19396        __struct.num_logs = buf.get_u16_le();
19397        __struct.last_log_num = buf.get_u16_le();
19398        Ok(__struct)
19399    }
19400    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19401        let mut __tmp = BytesMut::new(bytes);
19402        #[allow(clippy::absurd_extreme_comparisons)]
19403        #[allow(unused_comparisons)]
19404        if __tmp.remaining() < Self::ENCODED_LEN {
19405            panic!(
19406                "buffer is too small (need {} bytes, but got {})",
19407                Self::ENCODED_LEN,
19408                __tmp.remaining(),
19409            )
19410        }
19411        __tmp.put_u32_le(self.time_utc);
19412        __tmp.put_u32_le(self.size);
19413        __tmp.put_u16_le(self.id);
19414        __tmp.put_u16_le(self.num_logs);
19415        __tmp.put_u16_le(self.last_log_num);
19416        if matches!(version, MavlinkVersion::V2) {
19417            let len = __tmp.len();
19418            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19419        } else {
19420            __tmp.len()
19421        }
19422    }
19423}
19424#[doc = "Erase all logs."]
19425#[doc = ""]
19426#[doc = "ID: 121"]
19427#[derive(Debug, Clone, PartialEq)]
19428#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19429#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19430#[cfg_attr(feature = "ts", derive(TS))]
19431#[cfg_attr(feature = "ts", ts(export))]
19432pub struct LOG_ERASE_DATA {
19433    #[doc = "System ID"]
19434    pub target_system: u8,
19435    #[doc = "Component ID"]
19436    pub target_component: u8,
19437}
19438impl LOG_ERASE_DATA {
19439    pub const ENCODED_LEN: usize = 2usize;
19440    pub const DEFAULT: Self = Self {
19441        target_system: 0_u8,
19442        target_component: 0_u8,
19443    };
19444    #[cfg(feature = "arbitrary")]
19445    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19446        use arbitrary::{Arbitrary, Unstructured};
19447        let mut buf = [0u8; 1024];
19448        rng.fill_bytes(&mut buf);
19449        let mut unstructured = Unstructured::new(&buf);
19450        Self::arbitrary(&mut unstructured).unwrap_or_default()
19451    }
19452}
19453impl Default for LOG_ERASE_DATA {
19454    fn default() -> Self {
19455        Self::DEFAULT.clone()
19456    }
19457}
19458impl MessageData for LOG_ERASE_DATA {
19459    type Message = MavMessage;
19460    const ID: u32 = 121u32;
19461    const NAME: &'static str = "LOG_ERASE";
19462    const EXTRA_CRC: u8 = 237u8;
19463    const ENCODED_LEN: usize = 2usize;
19464    fn deser(
19465        _version: MavlinkVersion,
19466        __input: &[u8],
19467    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19468        let avail_len = __input.len();
19469        let mut payload_buf = [0; Self::ENCODED_LEN];
19470        let mut buf = if avail_len < Self::ENCODED_LEN {
19471            payload_buf[0..avail_len].copy_from_slice(__input);
19472            Bytes::new(&payload_buf)
19473        } else {
19474            Bytes::new(__input)
19475        };
19476        let mut __struct = Self::default();
19477        __struct.target_system = buf.get_u8();
19478        __struct.target_component = buf.get_u8();
19479        Ok(__struct)
19480    }
19481    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19482        let mut __tmp = BytesMut::new(bytes);
19483        #[allow(clippy::absurd_extreme_comparisons)]
19484        #[allow(unused_comparisons)]
19485        if __tmp.remaining() < Self::ENCODED_LEN {
19486            panic!(
19487                "buffer is too small (need {} bytes, but got {})",
19488                Self::ENCODED_LEN,
19489                __tmp.remaining(),
19490            )
19491        }
19492        __tmp.put_u8(self.target_system);
19493        __tmp.put_u8(self.target_component);
19494        if matches!(version, MavlinkVersion::V2) {
19495            let len = __tmp.len();
19496            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19497        } else {
19498            __tmp.len()
19499        }
19500    }
19501}
19502#[doc = "Request a chunk of a log."]
19503#[doc = ""]
19504#[doc = "ID: 119"]
19505#[derive(Debug, Clone, PartialEq)]
19506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19508#[cfg_attr(feature = "ts", derive(TS))]
19509#[cfg_attr(feature = "ts", ts(export))]
19510pub struct LOG_REQUEST_DATA_DATA {
19511    #[doc = "Offset into the log"]
19512    pub ofs: u32,
19513    #[doc = "Number of bytes"]
19514    pub count: u32,
19515    #[doc = "Log id (from LOG_ENTRY reply)"]
19516    pub id: u16,
19517    #[doc = "System ID"]
19518    pub target_system: u8,
19519    #[doc = "Component ID"]
19520    pub target_component: u8,
19521}
19522impl LOG_REQUEST_DATA_DATA {
19523    pub const ENCODED_LEN: usize = 12usize;
19524    pub const DEFAULT: Self = Self {
19525        ofs: 0_u32,
19526        count: 0_u32,
19527        id: 0_u16,
19528        target_system: 0_u8,
19529        target_component: 0_u8,
19530    };
19531    #[cfg(feature = "arbitrary")]
19532    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19533        use arbitrary::{Arbitrary, Unstructured};
19534        let mut buf = [0u8; 1024];
19535        rng.fill_bytes(&mut buf);
19536        let mut unstructured = Unstructured::new(&buf);
19537        Self::arbitrary(&mut unstructured).unwrap_or_default()
19538    }
19539}
19540impl Default for LOG_REQUEST_DATA_DATA {
19541    fn default() -> Self {
19542        Self::DEFAULT.clone()
19543    }
19544}
19545impl MessageData for LOG_REQUEST_DATA_DATA {
19546    type Message = MavMessage;
19547    const ID: u32 = 119u32;
19548    const NAME: &'static str = "LOG_REQUEST_DATA";
19549    const EXTRA_CRC: u8 = 116u8;
19550    const ENCODED_LEN: usize = 12usize;
19551    fn deser(
19552        _version: MavlinkVersion,
19553        __input: &[u8],
19554    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19555        let avail_len = __input.len();
19556        let mut payload_buf = [0; Self::ENCODED_LEN];
19557        let mut buf = if avail_len < Self::ENCODED_LEN {
19558            payload_buf[0..avail_len].copy_from_slice(__input);
19559            Bytes::new(&payload_buf)
19560        } else {
19561            Bytes::new(__input)
19562        };
19563        let mut __struct = Self::default();
19564        __struct.ofs = buf.get_u32_le();
19565        __struct.count = buf.get_u32_le();
19566        __struct.id = buf.get_u16_le();
19567        __struct.target_system = buf.get_u8();
19568        __struct.target_component = buf.get_u8();
19569        Ok(__struct)
19570    }
19571    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19572        let mut __tmp = BytesMut::new(bytes);
19573        #[allow(clippy::absurd_extreme_comparisons)]
19574        #[allow(unused_comparisons)]
19575        if __tmp.remaining() < Self::ENCODED_LEN {
19576            panic!(
19577                "buffer is too small (need {} bytes, but got {})",
19578                Self::ENCODED_LEN,
19579                __tmp.remaining(),
19580            )
19581        }
19582        __tmp.put_u32_le(self.ofs);
19583        __tmp.put_u32_le(self.count);
19584        __tmp.put_u16_le(self.id);
19585        __tmp.put_u8(self.target_system);
19586        __tmp.put_u8(self.target_component);
19587        if matches!(version, MavlinkVersion::V2) {
19588            let len = __tmp.len();
19589            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19590        } else {
19591            __tmp.len()
19592        }
19593    }
19594}
19595#[doc = "Stop log transfer and resume normal logging."]
19596#[doc = ""]
19597#[doc = "ID: 122"]
19598#[derive(Debug, Clone, PartialEq)]
19599#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19601#[cfg_attr(feature = "ts", derive(TS))]
19602#[cfg_attr(feature = "ts", ts(export))]
19603pub struct LOG_REQUEST_END_DATA {
19604    #[doc = "System ID"]
19605    pub target_system: u8,
19606    #[doc = "Component ID"]
19607    pub target_component: u8,
19608}
19609impl LOG_REQUEST_END_DATA {
19610    pub const ENCODED_LEN: usize = 2usize;
19611    pub const DEFAULT: Self = Self {
19612        target_system: 0_u8,
19613        target_component: 0_u8,
19614    };
19615    #[cfg(feature = "arbitrary")]
19616    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19617        use arbitrary::{Arbitrary, Unstructured};
19618        let mut buf = [0u8; 1024];
19619        rng.fill_bytes(&mut buf);
19620        let mut unstructured = Unstructured::new(&buf);
19621        Self::arbitrary(&mut unstructured).unwrap_or_default()
19622    }
19623}
19624impl Default for LOG_REQUEST_END_DATA {
19625    fn default() -> Self {
19626        Self::DEFAULT.clone()
19627    }
19628}
19629impl MessageData for LOG_REQUEST_END_DATA {
19630    type Message = MavMessage;
19631    const ID: u32 = 122u32;
19632    const NAME: &'static str = "LOG_REQUEST_END";
19633    const EXTRA_CRC: u8 = 203u8;
19634    const ENCODED_LEN: usize = 2usize;
19635    fn deser(
19636        _version: MavlinkVersion,
19637        __input: &[u8],
19638    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19639        let avail_len = __input.len();
19640        let mut payload_buf = [0; Self::ENCODED_LEN];
19641        let mut buf = if avail_len < Self::ENCODED_LEN {
19642            payload_buf[0..avail_len].copy_from_slice(__input);
19643            Bytes::new(&payload_buf)
19644        } else {
19645            Bytes::new(__input)
19646        };
19647        let mut __struct = Self::default();
19648        __struct.target_system = buf.get_u8();
19649        __struct.target_component = buf.get_u8();
19650        Ok(__struct)
19651    }
19652    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19653        let mut __tmp = BytesMut::new(bytes);
19654        #[allow(clippy::absurd_extreme_comparisons)]
19655        #[allow(unused_comparisons)]
19656        if __tmp.remaining() < Self::ENCODED_LEN {
19657            panic!(
19658                "buffer is too small (need {} bytes, but got {})",
19659                Self::ENCODED_LEN,
19660                __tmp.remaining(),
19661            )
19662        }
19663        __tmp.put_u8(self.target_system);
19664        __tmp.put_u8(self.target_component);
19665        if matches!(version, MavlinkVersion::V2) {
19666            let len = __tmp.len();
19667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19668        } else {
19669            __tmp.len()
19670        }
19671    }
19672}
19673#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
19674#[doc = ""]
19675#[doc = "ID: 117"]
19676#[derive(Debug, Clone, PartialEq)]
19677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19679#[cfg_attr(feature = "ts", derive(TS))]
19680#[cfg_attr(feature = "ts", ts(export))]
19681pub struct LOG_REQUEST_LIST_DATA {
19682    #[doc = "First log id (0 for first available)"]
19683    pub start: u16,
19684    #[doc = "Last log id (0xffff for last available)"]
19685    pub end: u16,
19686    #[doc = "System ID"]
19687    pub target_system: u8,
19688    #[doc = "Component ID"]
19689    pub target_component: u8,
19690}
19691impl LOG_REQUEST_LIST_DATA {
19692    pub const ENCODED_LEN: usize = 6usize;
19693    pub const DEFAULT: Self = Self {
19694        start: 0_u16,
19695        end: 0_u16,
19696        target_system: 0_u8,
19697        target_component: 0_u8,
19698    };
19699    #[cfg(feature = "arbitrary")]
19700    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19701        use arbitrary::{Arbitrary, Unstructured};
19702        let mut buf = [0u8; 1024];
19703        rng.fill_bytes(&mut buf);
19704        let mut unstructured = Unstructured::new(&buf);
19705        Self::arbitrary(&mut unstructured).unwrap_or_default()
19706    }
19707}
19708impl Default for LOG_REQUEST_LIST_DATA {
19709    fn default() -> Self {
19710        Self::DEFAULT.clone()
19711    }
19712}
19713impl MessageData for LOG_REQUEST_LIST_DATA {
19714    type Message = MavMessage;
19715    const ID: u32 = 117u32;
19716    const NAME: &'static str = "LOG_REQUEST_LIST";
19717    const EXTRA_CRC: u8 = 128u8;
19718    const ENCODED_LEN: usize = 6usize;
19719    fn deser(
19720        _version: MavlinkVersion,
19721        __input: &[u8],
19722    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19723        let avail_len = __input.len();
19724        let mut payload_buf = [0; Self::ENCODED_LEN];
19725        let mut buf = if avail_len < Self::ENCODED_LEN {
19726            payload_buf[0..avail_len].copy_from_slice(__input);
19727            Bytes::new(&payload_buf)
19728        } else {
19729            Bytes::new(__input)
19730        };
19731        let mut __struct = Self::default();
19732        __struct.start = buf.get_u16_le();
19733        __struct.end = buf.get_u16_le();
19734        __struct.target_system = buf.get_u8();
19735        __struct.target_component = buf.get_u8();
19736        Ok(__struct)
19737    }
19738    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19739        let mut __tmp = BytesMut::new(bytes);
19740        #[allow(clippy::absurd_extreme_comparisons)]
19741        #[allow(unused_comparisons)]
19742        if __tmp.remaining() < Self::ENCODED_LEN {
19743            panic!(
19744                "buffer is too small (need {} bytes, but got {})",
19745                Self::ENCODED_LEN,
19746                __tmp.remaining(),
19747            )
19748        }
19749        __tmp.put_u16_le(self.start);
19750        __tmp.put_u16_le(self.end);
19751        __tmp.put_u8(self.target_system);
19752        __tmp.put_u8(self.target_component);
19753        if matches!(version, MavlinkVersion::V2) {
19754            let len = __tmp.len();
19755            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19756        } else {
19757            __tmp.len()
19758        }
19759    }
19760}
19761#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
19762#[doc = ""]
19763#[doc = "ID: 192"]
19764#[derive(Debug, Clone, PartialEq)]
19765#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19766#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19767#[cfg_attr(feature = "ts", derive(TS))]
19768#[cfg_attr(feature = "ts", ts(export))]
19769pub struct MAG_CAL_REPORT_DATA {
19770    #[doc = "RMS milligauss residuals."]
19771    pub fitness: f32,
19772    #[doc = "X offset."]
19773    pub ofs_x: f32,
19774    #[doc = "Y offset."]
19775    pub ofs_y: f32,
19776    #[doc = "Z offset."]
19777    pub ofs_z: f32,
19778    #[doc = "X diagonal (matrix 11)."]
19779    pub diag_x: f32,
19780    #[doc = "Y diagonal (matrix 22)."]
19781    pub diag_y: f32,
19782    #[doc = "Z diagonal (matrix 33)."]
19783    pub diag_z: f32,
19784    #[doc = "X off-diagonal (matrix 12 and 21)."]
19785    pub offdiag_x: f32,
19786    #[doc = "Y off-diagonal (matrix 13 and 31)."]
19787    pub offdiag_y: f32,
19788    #[doc = "Z off-diagonal (matrix 32 and 23)."]
19789    pub offdiag_z: f32,
19790    #[doc = "Compass being calibrated."]
19791    pub compass_id: u8,
19792    #[doc = "Bitmask of compasses being calibrated."]
19793    pub cal_mask: u8,
19794    #[doc = "Calibration Status."]
19795    pub cal_status: MagCalStatus,
19796    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
19797    pub autosaved: u8,
19798    #[doc = "Confidence in orientation (higher is better)."]
19799    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19800    pub orientation_confidence: f32,
19801    #[doc = "orientation before calibration."]
19802    #[cfg_attr(feature = "serde", serde(default))]
19803    pub old_orientation: MavSensorOrientation,
19804    #[doc = "orientation after calibration."]
19805    #[cfg_attr(feature = "serde", serde(default))]
19806    pub new_orientation: MavSensorOrientation,
19807    #[doc = "field radius correction factor"]
19808    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19809    pub scale_factor: f32,
19810}
19811impl MAG_CAL_REPORT_DATA {
19812    pub const ENCODED_LEN: usize = 54usize;
19813    pub const DEFAULT: Self = Self {
19814        fitness: 0.0_f32,
19815        ofs_x: 0.0_f32,
19816        ofs_y: 0.0_f32,
19817        ofs_z: 0.0_f32,
19818        diag_x: 0.0_f32,
19819        diag_y: 0.0_f32,
19820        diag_z: 0.0_f32,
19821        offdiag_x: 0.0_f32,
19822        offdiag_y: 0.0_f32,
19823        offdiag_z: 0.0_f32,
19824        compass_id: 0_u8,
19825        cal_mask: 0_u8,
19826        cal_status: MagCalStatus::DEFAULT,
19827        autosaved: 0_u8,
19828        orientation_confidence: 0.0_f32,
19829        old_orientation: MavSensorOrientation::DEFAULT,
19830        new_orientation: MavSensorOrientation::DEFAULT,
19831        scale_factor: 0.0_f32,
19832    };
19833    #[cfg(feature = "arbitrary")]
19834    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19835        use arbitrary::{Arbitrary, Unstructured};
19836        let mut buf = [0u8; 1024];
19837        rng.fill_bytes(&mut buf);
19838        let mut unstructured = Unstructured::new(&buf);
19839        Self::arbitrary(&mut unstructured).unwrap_or_default()
19840    }
19841}
19842impl Default for MAG_CAL_REPORT_DATA {
19843    fn default() -> Self {
19844        Self::DEFAULT.clone()
19845    }
19846}
19847impl MessageData for MAG_CAL_REPORT_DATA {
19848    type Message = MavMessage;
19849    const ID: u32 = 192u32;
19850    const NAME: &'static str = "MAG_CAL_REPORT";
19851    const EXTRA_CRC: u8 = 36u8;
19852    const ENCODED_LEN: usize = 54usize;
19853    fn deser(
19854        _version: MavlinkVersion,
19855        __input: &[u8],
19856    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19857        let avail_len = __input.len();
19858        let mut payload_buf = [0; Self::ENCODED_LEN];
19859        let mut buf = if avail_len < Self::ENCODED_LEN {
19860            payload_buf[0..avail_len].copy_from_slice(__input);
19861            Bytes::new(&payload_buf)
19862        } else {
19863            Bytes::new(__input)
19864        };
19865        let mut __struct = Self::default();
19866        __struct.fitness = buf.get_f32_le();
19867        __struct.ofs_x = buf.get_f32_le();
19868        __struct.ofs_y = buf.get_f32_le();
19869        __struct.ofs_z = buf.get_f32_le();
19870        __struct.diag_x = buf.get_f32_le();
19871        __struct.diag_y = buf.get_f32_le();
19872        __struct.diag_z = buf.get_f32_le();
19873        __struct.offdiag_x = buf.get_f32_le();
19874        __struct.offdiag_y = buf.get_f32_le();
19875        __struct.offdiag_z = buf.get_f32_le();
19876        __struct.compass_id = buf.get_u8();
19877        __struct.cal_mask = buf.get_u8();
19878        let tmp = buf.get_u8();
19879        __struct.cal_status =
19880            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19881                enum_type: "MagCalStatus",
19882                value: tmp as u64,
19883            })?;
19884        __struct.autosaved = buf.get_u8();
19885        __struct.orientation_confidence = buf.get_f32_le();
19886        let tmp = buf.get_u8();
19887        __struct.old_orientation =
19888            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19889                enum_type: "MavSensorOrientation",
19890                value: tmp as u64,
19891            })?;
19892        let tmp = buf.get_u8();
19893        __struct.new_orientation =
19894            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19895                enum_type: "MavSensorOrientation",
19896                value: tmp as u64,
19897            })?;
19898        __struct.scale_factor = buf.get_f32_le();
19899        Ok(__struct)
19900    }
19901    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19902        let mut __tmp = BytesMut::new(bytes);
19903        #[allow(clippy::absurd_extreme_comparisons)]
19904        #[allow(unused_comparisons)]
19905        if __tmp.remaining() < Self::ENCODED_LEN {
19906            panic!(
19907                "buffer is too small (need {} bytes, but got {})",
19908                Self::ENCODED_LEN,
19909                __tmp.remaining(),
19910            )
19911        }
19912        __tmp.put_f32_le(self.fitness);
19913        __tmp.put_f32_le(self.ofs_x);
19914        __tmp.put_f32_le(self.ofs_y);
19915        __tmp.put_f32_le(self.ofs_z);
19916        __tmp.put_f32_le(self.diag_x);
19917        __tmp.put_f32_le(self.diag_y);
19918        __tmp.put_f32_le(self.diag_z);
19919        __tmp.put_f32_le(self.offdiag_x);
19920        __tmp.put_f32_le(self.offdiag_y);
19921        __tmp.put_f32_le(self.offdiag_z);
19922        __tmp.put_u8(self.compass_id);
19923        __tmp.put_u8(self.cal_mask);
19924        __tmp.put_u8(self.cal_status as u8);
19925        __tmp.put_u8(self.autosaved);
19926        if matches!(version, MavlinkVersion::V2) {
19927            __tmp.put_f32_le(self.orientation_confidence);
19928            __tmp.put_u8(self.old_orientation as u8);
19929            __tmp.put_u8(self.new_orientation as u8);
19930            __tmp.put_f32_le(self.scale_factor);
19931            let len = __tmp.len();
19932            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19933        } else {
19934            __tmp.len()
19935        }
19936    }
19937}
19938#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
19939#[doc = ""]
19940#[doc = "ID: 69"]
19941#[derive(Debug, Clone, PartialEq)]
19942#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19943#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19944#[cfg_attr(feature = "ts", derive(TS))]
19945#[cfg_attr(feature = "ts", ts(export))]
19946pub struct MANUAL_CONTROL_DATA {
19947    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
19948    pub x: i16,
19949    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
19950    pub y: i16,
19951    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
19952    pub z: i16,
19953    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
19954    pub r: i16,
19955    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
19956    pub buttons: u16,
19957    #[doc = "The system to be controlled."]
19958    pub target: u8,
19959    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
19960    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19961    pub buttons2: u16,
19962    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
19963    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19964    pub enabled_extensions: u8,
19965    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
19966    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19967    pub s: i16,
19968    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
19969    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19970    pub t: i16,
19971    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
19972    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19973    pub aux1: i16,
19974    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
19975    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19976    pub aux2: i16,
19977    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
19978    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19979    pub aux3: i16,
19980    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
19981    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19982    pub aux4: i16,
19983    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
19984    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19985    pub aux5: i16,
19986    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
19987    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19988    pub aux6: i16,
19989}
19990impl MANUAL_CONTROL_DATA {
19991    pub const ENCODED_LEN: usize = 30usize;
19992    pub const DEFAULT: Self = Self {
19993        x: 0_i16,
19994        y: 0_i16,
19995        z: 0_i16,
19996        r: 0_i16,
19997        buttons: 0_u16,
19998        target: 0_u8,
19999        buttons2: 0_u16,
20000        enabled_extensions: 0_u8,
20001        s: 0_i16,
20002        t: 0_i16,
20003        aux1: 0_i16,
20004        aux2: 0_i16,
20005        aux3: 0_i16,
20006        aux4: 0_i16,
20007        aux5: 0_i16,
20008        aux6: 0_i16,
20009    };
20010    #[cfg(feature = "arbitrary")]
20011    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20012        use arbitrary::{Arbitrary, Unstructured};
20013        let mut buf = [0u8; 1024];
20014        rng.fill_bytes(&mut buf);
20015        let mut unstructured = Unstructured::new(&buf);
20016        Self::arbitrary(&mut unstructured).unwrap_or_default()
20017    }
20018}
20019impl Default for MANUAL_CONTROL_DATA {
20020    fn default() -> Self {
20021        Self::DEFAULT.clone()
20022    }
20023}
20024impl MessageData for MANUAL_CONTROL_DATA {
20025    type Message = MavMessage;
20026    const ID: u32 = 69u32;
20027    const NAME: &'static str = "MANUAL_CONTROL";
20028    const EXTRA_CRC: u8 = 243u8;
20029    const ENCODED_LEN: usize = 30usize;
20030    fn deser(
20031        _version: MavlinkVersion,
20032        __input: &[u8],
20033    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20034        let avail_len = __input.len();
20035        let mut payload_buf = [0; Self::ENCODED_LEN];
20036        let mut buf = if avail_len < Self::ENCODED_LEN {
20037            payload_buf[0..avail_len].copy_from_slice(__input);
20038            Bytes::new(&payload_buf)
20039        } else {
20040            Bytes::new(__input)
20041        };
20042        let mut __struct = Self::default();
20043        __struct.x = buf.get_i16_le();
20044        __struct.y = buf.get_i16_le();
20045        __struct.z = buf.get_i16_le();
20046        __struct.r = buf.get_i16_le();
20047        __struct.buttons = buf.get_u16_le();
20048        __struct.target = buf.get_u8();
20049        __struct.buttons2 = buf.get_u16_le();
20050        __struct.enabled_extensions = buf.get_u8();
20051        __struct.s = buf.get_i16_le();
20052        __struct.t = buf.get_i16_le();
20053        __struct.aux1 = buf.get_i16_le();
20054        __struct.aux2 = buf.get_i16_le();
20055        __struct.aux3 = buf.get_i16_le();
20056        __struct.aux4 = buf.get_i16_le();
20057        __struct.aux5 = buf.get_i16_le();
20058        __struct.aux6 = buf.get_i16_le();
20059        Ok(__struct)
20060    }
20061    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20062        let mut __tmp = BytesMut::new(bytes);
20063        #[allow(clippy::absurd_extreme_comparisons)]
20064        #[allow(unused_comparisons)]
20065        if __tmp.remaining() < Self::ENCODED_LEN {
20066            panic!(
20067                "buffer is too small (need {} bytes, but got {})",
20068                Self::ENCODED_LEN,
20069                __tmp.remaining(),
20070            )
20071        }
20072        __tmp.put_i16_le(self.x);
20073        __tmp.put_i16_le(self.y);
20074        __tmp.put_i16_le(self.z);
20075        __tmp.put_i16_le(self.r);
20076        __tmp.put_u16_le(self.buttons);
20077        __tmp.put_u8(self.target);
20078        if matches!(version, MavlinkVersion::V2) {
20079            __tmp.put_u16_le(self.buttons2);
20080            __tmp.put_u8(self.enabled_extensions);
20081            __tmp.put_i16_le(self.s);
20082            __tmp.put_i16_le(self.t);
20083            __tmp.put_i16_le(self.aux1);
20084            __tmp.put_i16_le(self.aux2);
20085            __tmp.put_i16_le(self.aux3);
20086            __tmp.put_i16_le(self.aux4);
20087            __tmp.put_i16_le(self.aux5);
20088            __tmp.put_i16_le(self.aux6);
20089            let len = __tmp.len();
20090            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20091        } else {
20092            __tmp.len()
20093        }
20094    }
20095}
20096#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
20097#[doc = ""]
20098#[doc = "ID: 81"]
20099#[derive(Debug, Clone, PartialEq)]
20100#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20102#[cfg_attr(feature = "ts", derive(TS))]
20103#[cfg_attr(feature = "ts", ts(export))]
20104pub struct MANUAL_SETPOINT_DATA {
20105    #[doc = "Timestamp (time since system boot)."]
20106    pub time_boot_ms: u32,
20107    #[doc = "Desired roll rate"]
20108    pub roll: f32,
20109    #[doc = "Desired pitch rate"]
20110    pub pitch: f32,
20111    #[doc = "Desired yaw rate"]
20112    pub yaw: f32,
20113    #[doc = "Collective thrust, normalized to 0 .. 1"]
20114    pub thrust: f32,
20115    #[doc = "Flight mode switch position, 0.. 255"]
20116    pub mode_switch: u8,
20117    #[doc = "Override mode switch position, 0.. 255"]
20118    pub manual_override_switch: u8,
20119}
20120impl MANUAL_SETPOINT_DATA {
20121    pub const ENCODED_LEN: usize = 22usize;
20122    pub const DEFAULT: Self = Self {
20123        time_boot_ms: 0_u32,
20124        roll: 0.0_f32,
20125        pitch: 0.0_f32,
20126        yaw: 0.0_f32,
20127        thrust: 0.0_f32,
20128        mode_switch: 0_u8,
20129        manual_override_switch: 0_u8,
20130    };
20131    #[cfg(feature = "arbitrary")]
20132    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20133        use arbitrary::{Arbitrary, Unstructured};
20134        let mut buf = [0u8; 1024];
20135        rng.fill_bytes(&mut buf);
20136        let mut unstructured = Unstructured::new(&buf);
20137        Self::arbitrary(&mut unstructured).unwrap_or_default()
20138    }
20139}
20140impl Default for MANUAL_SETPOINT_DATA {
20141    fn default() -> Self {
20142        Self::DEFAULT.clone()
20143    }
20144}
20145impl MessageData for MANUAL_SETPOINT_DATA {
20146    type Message = MavMessage;
20147    const ID: u32 = 81u32;
20148    const NAME: &'static str = "MANUAL_SETPOINT";
20149    const EXTRA_CRC: u8 = 106u8;
20150    const ENCODED_LEN: usize = 22usize;
20151    fn deser(
20152        _version: MavlinkVersion,
20153        __input: &[u8],
20154    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20155        let avail_len = __input.len();
20156        let mut payload_buf = [0; Self::ENCODED_LEN];
20157        let mut buf = if avail_len < Self::ENCODED_LEN {
20158            payload_buf[0..avail_len].copy_from_slice(__input);
20159            Bytes::new(&payload_buf)
20160        } else {
20161            Bytes::new(__input)
20162        };
20163        let mut __struct = Self::default();
20164        __struct.time_boot_ms = buf.get_u32_le();
20165        __struct.roll = buf.get_f32_le();
20166        __struct.pitch = buf.get_f32_le();
20167        __struct.yaw = buf.get_f32_le();
20168        __struct.thrust = buf.get_f32_le();
20169        __struct.mode_switch = buf.get_u8();
20170        __struct.manual_override_switch = buf.get_u8();
20171        Ok(__struct)
20172    }
20173    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20174        let mut __tmp = BytesMut::new(bytes);
20175        #[allow(clippy::absurd_extreme_comparisons)]
20176        #[allow(unused_comparisons)]
20177        if __tmp.remaining() < Self::ENCODED_LEN {
20178            panic!(
20179                "buffer is too small (need {} bytes, but got {})",
20180                Self::ENCODED_LEN,
20181                __tmp.remaining(),
20182            )
20183        }
20184        __tmp.put_u32_le(self.time_boot_ms);
20185        __tmp.put_f32_le(self.roll);
20186        __tmp.put_f32_le(self.pitch);
20187        __tmp.put_f32_le(self.yaw);
20188        __tmp.put_f32_le(self.thrust);
20189        __tmp.put_u8(self.mode_switch);
20190        __tmp.put_u8(self.manual_override_switch);
20191        if matches!(version, MavlinkVersion::V2) {
20192            let len = __tmp.len();
20193            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20194        } else {
20195            __tmp.len()
20196        }
20197    }
20198}
20199#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20200#[doc = ""]
20201#[doc = "ID: 249"]
20202#[derive(Debug, Clone, PartialEq)]
20203#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20204#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20205#[cfg_attr(feature = "ts", derive(TS))]
20206#[cfg_attr(feature = "ts", ts(export))]
20207pub struct MEMORY_VECT_DATA {
20208    #[doc = "Starting address of the debug variables"]
20209    pub address: u16,
20210    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
20211    pub ver: u8,
20212    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
20213    pub mavtype: u8,
20214    #[doc = "Memory contents at specified address"]
20215    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20216    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20217    pub value: [i8; 32],
20218}
20219impl MEMORY_VECT_DATA {
20220    pub const ENCODED_LEN: usize = 36usize;
20221    pub const DEFAULT: Self = Self {
20222        address: 0_u16,
20223        ver: 0_u8,
20224        mavtype: 0_u8,
20225        value: [0_i8; 32usize],
20226    };
20227    #[cfg(feature = "arbitrary")]
20228    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20229        use arbitrary::{Arbitrary, Unstructured};
20230        let mut buf = [0u8; 1024];
20231        rng.fill_bytes(&mut buf);
20232        let mut unstructured = Unstructured::new(&buf);
20233        Self::arbitrary(&mut unstructured).unwrap_or_default()
20234    }
20235}
20236impl Default for MEMORY_VECT_DATA {
20237    fn default() -> Self {
20238        Self::DEFAULT.clone()
20239    }
20240}
20241impl MessageData for MEMORY_VECT_DATA {
20242    type Message = MavMessage;
20243    const ID: u32 = 249u32;
20244    const NAME: &'static str = "MEMORY_VECT";
20245    const EXTRA_CRC: u8 = 204u8;
20246    const ENCODED_LEN: usize = 36usize;
20247    fn deser(
20248        _version: MavlinkVersion,
20249        __input: &[u8],
20250    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20251        let avail_len = __input.len();
20252        let mut payload_buf = [0; Self::ENCODED_LEN];
20253        let mut buf = if avail_len < Self::ENCODED_LEN {
20254            payload_buf[0..avail_len].copy_from_slice(__input);
20255            Bytes::new(&payload_buf)
20256        } else {
20257            Bytes::new(__input)
20258        };
20259        let mut __struct = Self::default();
20260        __struct.address = buf.get_u16_le();
20261        __struct.ver = buf.get_u8();
20262        __struct.mavtype = buf.get_u8();
20263        for v in &mut __struct.value {
20264            let val = buf.get_i8();
20265            *v = val;
20266        }
20267        Ok(__struct)
20268    }
20269    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20270        let mut __tmp = BytesMut::new(bytes);
20271        #[allow(clippy::absurd_extreme_comparisons)]
20272        #[allow(unused_comparisons)]
20273        if __tmp.remaining() < Self::ENCODED_LEN {
20274            panic!(
20275                "buffer is too small (need {} bytes, but got {})",
20276                Self::ENCODED_LEN,
20277                __tmp.remaining(),
20278            )
20279        }
20280        __tmp.put_u16_le(self.address);
20281        __tmp.put_u8(self.ver);
20282        __tmp.put_u8(self.mavtype);
20283        for val in &self.value {
20284            __tmp.put_i8(*val);
20285        }
20286        if matches!(version, MavlinkVersion::V2) {
20287            let len = __tmp.len();
20288            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20289        } else {
20290            __tmp.len()
20291        }
20292    }
20293}
20294#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
20295#[doc = ""]
20296#[doc = "ID: 244"]
20297#[derive(Debug, Clone, PartialEq)]
20298#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20299#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20300#[cfg_attr(feature = "ts", derive(TS))]
20301#[cfg_attr(feature = "ts", ts(export))]
20302pub struct MESSAGE_INTERVAL_DATA {
20303    #[doc = "0 indicates the interval at which it is sent."]
20304    pub interval_us: i32,
20305    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
20306    pub message_id: u16,
20307}
20308impl MESSAGE_INTERVAL_DATA {
20309    pub const ENCODED_LEN: usize = 6usize;
20310    pub const DEFAULT: Self = Self {
20311        interval_us: 0_i32,
20312        message_id: 0_u16,
20313    };
20314    #[cfg(feature = "arbitrary")]
20315    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20316        use arbitrary::{Arbitrary, Unstructured};
20317        let mut buf = [0u8; 1024];
20318        rng.fill_bytes(&mut buf);
20319        let mut unstructured = Unstructured::new(&buf);
20320        Self::arbitrary(&mut unstructured).unwrap_or_default()
20321    }
20322}
20323impl Default for MESSAGE_INTERVAL_DATA {
20324    fn default() -> Self {
20325        Self::DEFAULT.clone()
20326    }
20327}
20328impl MessageData for MESSAGE_INTERVAL_DATA {
20329    type Message = MavMessage;
20330    const ID: u32 = 244u32;
20331    const NAME: &'static str = "MESSAGE_INTERVAL";
20332    const EXTRA_CRC: u8 = 95u8;
20333    const ENCODED_LEN: usize = 6usize;
20334    fn deser(
20335        _version: MavlinkVersion,
20336        __input: &[u8],
20337    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20338        let avail_len = __input.len();
20339        let mut payload_buf = [0; Self::ENCODED_LEN];
20340        let mut buf = if avail_len < Self::ENCODED_LEN {
20341            payload_buf[0..avail_len].copy_from_slice(__input);
20342            Bytes::new(&payload_buf)
20343        } else {
20344            Bytes::new(__input)
20345        };
20346        let mut __struct = Self::default();
20347        __struct.interval_us = buf.get_i32_le();
20348        __struct.message_id = buf.get_u16_le();
20349        Ok(__struct)
20350    }
20351    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20352        let mut __tmp = BytesMut::new(bytes);
20353        #[allow(clippy::absurd_extreme_comparisons)]
20354        #[allow(unused_comparisons)]
20355        if __tmp.remaining() < Self::ENCODED_LEN {
20356            panic!(
20357                "buffer is too small (need {} bytes, but got {})",
20358                Self::ENCODED_LEN,
20359                __tmp.remaining(),
20360            )
20361        }
20362        __tmp.put_i32_le(self.interval_us);
20363        __tmp.put_u16_le(self.message_id);
20364        if matches!(version, MavlinkVersion::V2) {
20365            let len = __tmp.len();
20366            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20367        } else {
20368            __tmp.len()
20369        }
20370    }
20371}
20372#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
20373#[doc = ""]
20374#[doc = "ID: 47"]
20375#[derive(Debug, Clone, PartialEq)]
20376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20378#[cfg_attr(feature = "ts", derive(TS))]
20379#[cfg_attr(feature = "ts", ts(export))]
20380pub struct MISSION_ACK_DATA {
20381    #[doc = "System ID"]
20382    pub target_system: u8,
20383    #[doc = "Component ID"]
20384    pub target_component: u8,
20385    #[doc = "Mission result."]
20386    pub mavtype: MavMissionResult,
20387    #[doc = "Mission type."]
20388    #[cfg_attr(feature = "serde", serde(default))]
20389    pub mission_type: MavMissionType,
20390    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
20391    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20392    pub opaque_id: u32,
20393}
20394impl MISSION_ACK_DATA {
20395    pub const ENCODED_LEN: usize = 8usize;
20396    pub const DEFAULT: Self = Self {
20397        target_system: 0_u8,
20398        target_component: 0_u8,
20399        mavtype: MavMissionResult::DEFAULT,
20400        mission_type: MavMissionType::DEFAULT,
20401        opaque_id: 0_u32,
20402    };
20403    #[cfg(feature = "arbitrary")]
20404    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20405        use arbitrary::{Arbitrary, Unstructured};
20406        let mut buf = [0u8; 1024];
20407        rng.fill_bytes(&mut buf);
20408        let mut unstructured = Unstructured::new(&buf);
20409        Self::arbitrary(&mut unstructured).unwrap_or_default()
20410    }
20411}
20412impl Default for MISSION_ACK_DATA {
20413    fn default() -> Self {
20414        Self::DEFAULT.clone()
20415    }
20416}
20417impl MessageData for MISSION_ACK_DATA {
20418    type Message = MavMessage;
20419    const ID: u32 = 47u32;
20420    const NAME: &'static str = "MISSION_ACK";
20421    const EXTRA_CRC: u8 = 153u8;
20422    const ENCODED_LEN: usize = 8usize;
20423    fn deser(
20424        _version: MavlinkVersion,
20425        __input: &[u8],
20426    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20427        let avail_len = __input.len();
20428        let mut payload_buf = [0; Self::ENCODED_LEN];
20429        let mut buf = if avail_len < Self::ENCODED_LEN {
20430            payload_buf[0..avail_len].copy_from_slice(__input);
20431            Bytes::new(&payload_buf)
20432        } else {
20433            Bytes::new(__input)
20434        };
20435        let mut __struct = Self::default();
20436        __struct.target_system = buf.get_u8();
20437        __struct.target_component = buf.get_u8();
20438        let tmp = buf.get_u8();
20439        __struct.mavtype =
20440            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20441                enum_type: "MavMissionResult",
20442                value: tmp as u64,
20443            })?;
20444        let tmp = buf.get_u8();
20445        __struct.mission_type =
20446            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20447                enum_type: "MavMissionType",
20448                value: tmp as u64,
20449            })?;
20450        __struct.opaque_id = buf.get_u32_le();
20451        Ok(__struct)
20452    }
20453    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20454        let mut __tmp = BytesMut::new(bytes);
20455        #[allow(clippy::absurd_extreme_comparisons)]
20456        #[allow(unused_comparisons)]
20457        if __tmp.remaining() < Self::ENCODED_LEN {
20458            panic!(
20459                "buffer is too small (need {} bytes, but got {})",
20460                Self::ENCODED_LEN,
20461                __tmp.remaining(),
20462            )
20463        }
20464        __tmp.put_u8(self.target_system);
20465        __tmp.put_u8(self.target_component);
20466        __tmp.put_u8(self.mavtype as u8);
20467        if matches!(version, MavlinkVersion::V2) {
20468            __tmp.put_u8(self.mission_type as u8);
20469            __tmp.put_u32_le(self.opaque_id);
20470            let len = __tmp.len();
20471            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20472        } else {
20473            __tmp.len()
20474        }
20475    }
20476}
20477#[doc = "Delete all mission items at once."]
20478#[doc = ""]
20479#[doc = "ID: 45"]
20480#[derive(Debug, Clone, PartialEq)]
20481#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20482#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20483#[cfg_attr(feature = "ts", derive(TS))]
20484#[cfg_attr(feature = "ts", ts(export))]
20485pub struct MISSION_CLEAR_ALL_DATA {
20486    #[doc = "System ID"]
20487    pub target_system: u8,
20488    #[doc = "Component ID"]
20489    pub target_component: u8,
20490    #[doc = "Mission type."]
20491    #[cfg_attr(feature = "serde", serde(default))]
20492    pub mission_type: MavMissionType,
20493}
20494impl MISSION_CLEAR_ALL_DATA {
20495    pub const ENCODED_LEN: usize = 3usize;
20496    pub const DEFAULT: Self = Self {
20497        target_system: 0_u8,
20498        target_component: 0_u8,
20499        mission_type: MavMissionType::DEFAULT,
20500    };
20501    #[cfg(feature = "arbitrary")]
20502    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20503        use arbitrary::{Arbitrary, Unstructured};
20504        let mut buf = [0u8; 1024];
20505        rng.fill_bytes(&mut buf);
20506        let mut unstructured = Unstructured::new(&buf);
20507        Self::arbitrary(&mut unstructured).unwrap_or_default()
20508    }
20509}
20510impl Default for MISSION_CLEAR_ALL_DATA {
20511    fn default() -> Self {
20512        Self::DEFAULT.clone()
20513    }
20514}
20515impl MessageData for MISSION_CLEAR_ALL_DATA {
20516    type Message = MavMessage;
20517    const ID: u32 = 45u32;
20518    const NAME: &'static str = "MISSION_CLEAR_ALL";
20519    const EXTRA_CRC: u8 = 232u8;
20520    const ENCODED_LEN: usize = 3usize;
20521    fn deser(
20522        _version: MavlinkVersion,
20523        __input: &[u8],
20524    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20525        let avail_len = __input.len();
20526        let mut payload_buf = [0; Self::ENCODED_LEN];
20527        let mut buf = if avail_len < Self::ENCODED_LEN {
20528            payload_buf[0..avail_len].copy_from_slice(__input);
20529            Bytes::new(&payload_buf)
20530        } else {
20531            Bytes::new(__input)
20532        };
20533        let mut __struct = Self::default();
20534        __struct.target_system = buf.get_u8();
20535        __struct.target_component = buf.get_u8();
20536        let tmp = buf.get_u8();
20537        __struct.mission_type =
20538            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20539                enum_type: "MavMissionType",
20540                value: tmp as u64,
20541            })?;
20542        Ok(__struct)
20543    }
20544    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20545        let mut __tmp = BytesMut::new(bytes);
20546        #[allow(clippy::absurd_extreme_comparisons)]
20547        #[allow(unused_comparisons)]
20548        if __tmp.remaining() < Self::ENCODED_LEN {
20549            panic!(
20550                "buffer is too small (need {} bytes, but got {})",
20551                Self::ENCODED_LEN,
20552                __tmp.remaining(),
20553            )
20554        }
20555        __tmp.put_u8(self.target_system);
20556        __tmp.put_u8(self.target_component);
20557        if matches!(version, MavlinkVersion::V2) {
20558            __tmp.put_u8(self.mission_type as u8);
20559            let len = __tmp.len();
20560            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20561        } else {
20562            __tmp.len()
20563        }
20564    }
20565}
20566#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
20567#[doc = ""]
20568#[doc = "ID: 44"]
20569#[derive(Debug, Clone, PartialEq)]
20570#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20571#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20572#[cfg_attr(feature = "ts", derive(TS))]
20573#[cfg_attr(feature = "ts", ts(export))]
20574pub struct MISSION_COUNT_DATA {
20575    #[doc = "Number of mission items in the sequence"]
20576    pub count: u16,
20577    #[doc = "System ID"]
20578    pub target_system: u8,
20579    #[doc = "Component ID"]
20580    pub target_component: u8,
20581    #[doc = "Mission type."]
20582    #[cfg_attr(feature = "serde", serde(default))]
20583    pub mission_type: MavMissionType,
20584    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
20585    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20586    pub opaque_id: u32,
20587}
20588impl MISSION_COUNT_DATA {
20589    pub const ENCODED_LEN: usize = 9usize;
20590    pub const DEFAULT: Self = Self {
20591        count: 0_u16,
20592        target_system: 0_u8,
20593        target_component: 0_u8,
20594        mission_type: MavMissionType::DEFAULT,
20595        opaque_id: 0_u32,
20596    };
20597    #[cfg(feature = "arbitrary")]
20598    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20599        use arbitrary::{Arbitrary, Unstructured};
20600        let mut buf = [0u8; 1024];
20601        rng.fill_bytes(&mut buf);
20602        let mut unstructured = Unstructured::new(&buf);
20603        Self::arbitrary(&mut unstructured).unwrap_or_default()
20604    }
20605}
20606impl Default for MISSION_COUNT_DATA {
20607    fn default() -> Self {
20608        Self::DEFAULT.clone()
20609    }
20610}
20611impl MessageData for MISSION_COUNT_DATA {
20612    type Message = MavMessage;
20613    const ID: u32 = 44u32;
20614    const NAME: &'static str = "MISSION_COUNT";
20615    const EXTRA_CRC: u8 = 221u8;
20616    const ENCODED_LEN: usize = 9usize;
20617    fn deser(
20618        _version: MavlinkVersion,
20619        __input: &[u8],
20620    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20621        let avail_len = __input.len();
20622        let mut payload_buf = [0; Self::ENCODED_LEN];
20623        let mut buf = if avail_len < Self::ENCODED_LEN {
20624            payload_buf[0..avail_len].copy_from_slice(__input);
20625            Bytes::new(&payload_buf)
20626        } else {
20627            Bytes::new(__input)
20628        };
20629        let mut __struct = Self::default();
20630        __struct.count = buf.get_u16_le();
20631        __struct.target_system = buf.get_u8();
20632        __struct.target_component = buf.get_u8();
20633        let tmp = buf.get_u8();
20634        __struct.mission_type =
20635            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20636                enum_type: "MavMissionType",
20637                value: tmp as u64,
20638            })?;
20639        __struct.opaque_id = buf.get_u32_le();
20640        Ok(__struct)
20641    }
20642    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20643        let mut __tmp = BytesMut::new(bytes);
20644        #[allow(clippy::absurd_extreme_comparisons)]
20645        #[allow(unused_comparisons)]
20646        if __tmp.remaining() < Self::ENCODED_LEN {
20647            panic!(
20648                "buffer is too small (need {} bytes, but got {})",
20649                Self::ENCODED_LEN,
20650                __tmp.remaining(),
20651            )
20652        }
20653        __tmp.put_u16_le(self.count);
20654        __tmp.put_u8(self.target_system);
20655        __tmp.put_u8(self.target_component);
20656        if matches!(version, MavlinkVersion::V2) {
20657            __tmp.put_u8(self.mission_type as u8);
20658            __tmp.put_u32_le(self.opaque_id);
20659            let len = __tmp.len();
20660            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20661        } else {
20662            __tmp.len()
20663        }
20664    }
20665}
20666#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
20667#[doc = ""]
20668#[doc = "ID: 42"]
20669#[derive(Debug, Clone, PartialEq)]
20670#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20671#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20672#[cfg_attr(feature = "ts", derive(TS))]
20673#[cfg_attr(feature = "ts", ts(export))]
20674pub struct MISSION_CURRENT_DATA {
20675    #[doc = "Sequence"]
20676    pub seq: u16,
20677    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
20678    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20679    pub total: u16,
20680    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
20681    #[cfg_attr(feature = "serde", serde(default))]
20682    pub mission_state: MissionState,
20683    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
20684    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20685    pub mission_mode: u8,
20686    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
20687    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20688    pub mission_id: u32,
20689    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
20690    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20691    pub fence_id: u32,
20692    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
20693    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20694    pub rally_points_id: u32,
20695}
20696impl MISSION_CURRENT_DATA {
20697    pub const ENCODED_LEN: usize = 18usize;
20698    pub const DEFAULT: Self = Self {
20699        seq: 0_u16,
20700        total: 0_u16,
20701        mission_state: MissionState::DEFAULT,
20702        mission_mode: 0_u8,
20703        mission_id: 0_u32,
20704        fence_id: 0_u32,
20705        rally_points_id: 0_u32,
20706    };
20707    #[cfg(feature = "arbitrary")]
20708    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20709        use arbitrary::{Arbitrary, Unstructured};
20710        let mut buf = [0u8; 1024];
20711        rng.fill_bytes(&mut buf);
20712        let mut unstructured = Unstructured::new(&buf);
20713        Self::arbitrary(&mut unstructured).unwrap_or_default()
20714    }
20715}
20716impl Default for MISSION_CURRENT_DATA {
20717    fn default() -> Self {
20718        Self::DEFAULT.clone()
20719    }
20720}
20721impl MessageData for MISSION_CURRENT_DATA {
20722    type Message = MavMessage;
20723    const ID: u32 = 42u32;
20724    const NAME: &'static str = "MISSION_CURRENT";
20725    const EXTRA_CRC: u8 = 28u8;
20726    const ENCODED_LEN: usize = 18usize;
20727    fn deser(
20728        _version: MavlinkVersion,
20729        __input: &[u8],
20730    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20731        let avail_len = __input.len();
20732        let mut payload_buf = [0; Self::ENCODED_LEN];
20733        let mut buf = if avail_len < Self::ENCODED_LEN {
20734            payload_buf[0..avail_len].copy_from_slice(__input);
20735            Bytes::new(&payload_buf)
20736        } else {
20737            Bytes::new(__input)
20738        };
20739        let mut __struct = Self::default();
20740        __struct.seq = buf.get_u16_le();
20741        __struct.total = buf.get_u16_le();
20742        let tmp = buf.get_u8();
20743        __struct.mission_state =
20744            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20745                enum_type: "MissionState",
20746                value: tmp as u64,
20747            })?;
20748        __struct.mission_mode = buf.get_u8();
20749        __struct.mission_id = buf.get_u32_le();
20750        __struct.fence_id = buf.get_u32_le();
20751        __struct.rally_points_id = buf.get_u32_le();
20752        Ok(__struct)
20753    }
20754    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20755        let mut __tmp = BytesMut::new(bytes);
20756        #[allow(clippy::absurd_extreme_comparisons)]
20757        #[allow(unused_comparisons)]
20758        if __tmp.remaining() < Self::ENCODED_LEN {
20759            panic!(
20760                "buffer is too small (need {} bytes, but got {})",
20761                Self::ENCODED_LEN,
20762                __tmp.remaining(),
20763            )
20764        }
20765        __tmp.put_u16_le(self.seq);
20766        if matches!(version, MavlinkVersion::V2) {
20767            __tmp.put_u16_le(self.total);
20768            __tmp.put_u8(self.mission_state as u8);
20769            __tmp.put_u8(self.mission_mode);
20770            __tmp.put_u32_le(self.mission_id);
20771            __tmp.put_u32_le(self.fence_id);
20772            __tmp.put_u32_le(self.rally_points_id);
20773            let len = __tmp.len();
20774            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20775        } else {
20776            __tmp.len()
20777        }
20778    }
20779}
20780#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
20781#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20782#[doc = ""]
20783#[doc = "ID: 39"]
20784#[derive(Debug, Clone, PartialEq)]
20785#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20786#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20787#[cfg_attr(feature = "ts", derive(TS))]
20788#[cfg_attr(feature = "ts", ts(export))]
20789pub struct MISSION_ITEM_DATA {
20790    #[doc = "PARAM1, see MAV_CMD enum"]
20791    pub param1: f32,
20792    #[doc = "PARAM2, see MAV_CMD enum"]
20793    pub param2: f32,
20794    #[doc = "PARAM3, see MAV_CMD enum"]
20795    pub param3: f32,
20796    #[doc = "PARAM4, see MAV_CMD enum"]
20797    pub param4: f32,
20798    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
20799    pub x: f32,
20800    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
20801    pub y: f32,
20802    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
20803    pub z: f32,
20804    #[doc = "Sequence"]
20805    pub seq: u16,
20806    #[doc = "The scheduled action for the waypoint."]
20807    pub command: MavCmd,
20808    #[doc = "System ID"]
20809    pub target_system: u8,
20810    #[doc = "Component ID"]
20811    pub target_component: u8,
20812    #[doc = "The coordinate system of the waypoint."]
20813    pub frame: MavFrame,
20814    #[doc = "false:0, true:1"]
20815    pub current: u8,
20816    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20817    pub autocontinue: u8,
20818    #[doc = "Mission type."]
20819    #[cfg_attr(feature = "serde", serde(default))]
20820    pub mission_type: MavMissionType,
20821}
20822impl MISSION_ITEM_DATA {
20823    pub const ENCODED_LEN: usize = 38usize;
20824    pub const DEFAULT: Self = Self {
20825        param1: 0.0_f32,
20826        param2: 0.0_f32,
20827        param3: 0.0_f32,
20828        param4: 0.0_f32,
20829        x: 0.0_f32,
20830        y: 0.0_f32,
20831        z: 0.0_f32,
20832        seq: 0_u16,
20833        command: MavCmd::DEFAULT,
20834        target_system: 0_u8,
20835        target_component: 0_u8,
20836        frame: MavFrame::DEFAULT,
20837        current: 0_u8,
20838        autocontinue: 0_u8,
20839        mission_type: MavMissionType::DEFAULT,
20840    };
20841    #[cfg(feature = "arbitrary")]
20842    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20843        use arbitrary::{Arbitrary, Unstructured};
20844        let mut buf = [0u8; 1024];
20845        rng.fill_bytes(&mut buf);
20846        let mut unstructured = Unstructured::new(&buf);
20847        Self::arbitrary(&mut unstructured).unwrap_or_default()
20848    }
20849}
20850impl Default for MISSION_ITEM_DATA {
20851    fn default() -> Self {
20852        Self::DEFAULT.clone()
20853    }
20854}
20855impl MessageData for MISSION_ITEM_DATA {
20856    type Message = MavMessage;
20857    const ID: u32 = 39u32;
20858    const NAME: &'static str = "MISSION_ITEM";
20859    const EXTRA_CRC: u8 = 254u8;
20860    const ENCODED_LEN: usize = 38usize;
20861    fn deser(
20862        _version: MavlinkVersion,
20863        __input: &[u8],
20864    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20865        let avail_len = __input.len();
20866        let mut payload_buf = [0; Self::ENCODED_LEN];
20867        let mut buf = if avail_len < Self::ENCODED_LEN {
20868            payload_buf[0..avail_len].copy_from_slice(__input);
20869            Bytes::new(&payload_buf)
20870        } else {
20871            Bytes::new(__input)
20872        };
20873        let mut __struct = Self::default();
20874        __struct.param1 = buf.get_f32_le();
20875        __struct.param2 = buf.get_f32_le();
20876        __struct.param3 = buf.get_f32_le();
20877        __struct.param4 = buf.get_f32_le();
20878        __struct.x = buf.get_f32_le();
20879        __struct.y = buf.get_f32_le();
20880        __struct.z = buf.get_f32_le();
20881        __struct.seq = buf.get_u16_le();
20882        let tmp = buf.get_u16_le();
20883        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20884            ::mavlink_core::error::ParserError::InvalidEnum {
20885                enum_type: "MavCmd",
20886                value: tmp as u64,
20887            },
20888        )?;
20889        __struct.target_system = buf.get_u8();
20890        __struct.target_component = buf.get_u8();
20891        let tmp = buf.get_u8();
20892        __struct.frame =
20893            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20894                enum_type: "MavFrame",
20895                value: tmp as u64,
20896            })?;
20897        __struct.current = buf.get_u8();
20898        __struct.autocontinue = buf.get_u8();
20899        let tmp = buf.get_u8();
20900        __struct.mission_type =
20901            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20902                enum_type: "MavMissionType",
20903                value: tmp as u64,
20904            })?;
20905        Ok(__struct)
20906    }
20907    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20908        let mut __tmp = BytesMut::new(bytes);
20909        #[allow(clippy::absurd_extreme_comparisons)]
20910        #[allow(unused_comparisons)]
20911        if __tmp.remaining() < Self::ENCODED_LEN {
20912            panic!(
20913                "buffer is too small (need {} bytes, but got {})",
20914                Self::ENCODED_LEN,
20915                __tmp.remaining(),
20916            )
20917        }
20918        __tmp.put_f32_le(self.param1);
20919        __tmp.put_f32_le(self.param2);
20920        __tmp.put_f32_le(self.param3);
20921        __tmp.put_f32_le(self.param4);
20922        __tmp.put_f32_le(self.x);
20923        __tmp.put_f32_le(self.y);
20924        __tmp.put_f32_le(self.z);
20925        __tmp.put_u16_le(self.seq);
20926        __tmp.put_u16_le(self.command as u16);
20927        __tmp.put_u8(self.target_system);
20928        __tmp.put_u8(self.target_component);
20929        __tmp.put_u8(self.frame as u8);
20930        __tmp.put_u8(self.current);
20931        __tmp.put_u8(self.autocontinue);
20932        if matches!(version, MavlinkVersion::V2) {
20933            __tmp.put_u8(self.mission_type as u8);
20934            let len = __tmp.len();
20935            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20936        } else {
20937            __tmp.len()
20938        }
20939    }
20940}
20941#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20942#[doc = ""]
20943#[doc = "ID: 73"]
20944#[derive(Debug, Clone, PartialEq)]
20945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20947#[cfg_attr(feature = "ts", derive(TS))]
20948#[cfg_attr(feature = "ts", ts(export))]
20949pub struct MISSION_ITEM_INT_DATA {
20950    #[doc = "PARAM1, see MAV_CMD enum"]
20951    pub param1: f32,
20952    #[doc = "PARAM2, see MAV_CMD enum"]
20953    pub param2: f32,
20954    #[doc = "PARAM3, see MAV_CMD enum"]
20955    pub param3: f32,
20956    #[doc = "PARAM4, see MAV_CMD enum"]
20957    pub param4: f32,
20958    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
20959    pub x: i32,
20960    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
20961    pub y: i32,
20962    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
20963    pub z: f32,
20964    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
20965    pub seq: u16,
20966    #[doc = "The scheduled action for the waypoint."]
20967    pub command: MavCmd,
20968    #[doc = "System ID"]
20969    pub target_system: u8,
20970    #[doc = "Component ID"]
20971    pub target_component: u8,
20972    #[doc = "The coordinate system of the waypoint."]
20973    pub frame: MavFrame,
20974    #[doc = "false:0, true:1"]
20975    pub current: u8,
20976    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20977    pub autocontinue: u8,
20978    #[doc = "Mission type."]
20979    #[cfg_attr(feature = "serde", serde(default))]
20980    pub mission_type: MavMissionType,
20981}
20982impl MISSION_ITEM_INT_DATA {
20983    pub const ENCODED_LEN: usize = 38usize;
20984    pub const DEFAULT: Self = Self {
20985        param1: 0.0_f32,
20986        param2: 0.0_f32,
20987        param3: 0.0_f32,
20988        param4: 0.0_f32,
20989        x: 0_i32,
20990        y: 0_i32,
20991        z: 0.0_f32,
20992        seq: 0_u16,
20993        command: MavCmd::DEFAULT,
20994        target_system: 0_u8,
20995        target_component: 0_u8,
20996        frame: MavFrame::DEFAULT,
20997        current: 0_u8,
20998        autocontinue: 0_u8,
20999        mission_type: MavMissionType::DEFAULT,
21000    };
21001    #[cfg(feature = "arbitrary")]
21002    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21003        use arbitrary::{Arbitrary, Unstructured};
21004        let mut buf = [0u8; 1024];
21005        rng.fill_bytes(&mut buf);
21006        let mut unstructured = Unstructured::new(&buf);
21007        Self::arbitrary(&mut unstructured).unwrap_or_default()
21008    }
21009}
21010impl Default for MISSION_ITEM_INT_DATA {
21011    fn default() -> Self {
21012        Self::DEFAULT.clone()
21013    }
21014}
21015impl MessageData for MISSION_ITEM_INT_DATA {
21016    type Message = MavMessage;
21017    const ID: u32 = 73u32;
21018    const NAME: &'static str = "MISSION_ITEM_INT";
21019    const EXTRA_CRC: u8 = 38u8;
21020    const ENCODED_LEN: usize = 38usize;
21021    fn deser(
21022        _version: MavlinkVersion,
21023        __input: &[u8],
21024    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21025        let avail_len = __input.len();
21026        let mut payload_buf = [0; Self::ENCODED_LEN];
21027        let mut buf = if avail_len < Self::ENCODED_LEN {
21028            payload_buf[0..avail_len].copy_from_slice(__input);
21029            Bytes::new(&payload_buf)
21030        } else {
21031            Bytes::new(__input)
21032        };
21033        let mut __struct = Self::default();
21034        __struct.param1 = buf.get_f32_le();
21035        __struct.param2 = buf.get_f32_le();
21036        __struct.param3 = buf.get_f32_le();
21037        __struct.param4 = buf.get_f32_le();
21038        __struct.x = buf.get_i32_le();
21039        __struct.y = buf.get_i32_le();
21040        __struct.z = buf.get_f32_le();
21041        __struct.seq = buf.get_u16_le();
21042        let tmp = buf.get_u16_le();
21043        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
21044            ::mavlink_core::error::ParserError::InvalidEnum {
21045                enum_type: "MavCmd",
21046                value: tmp as u64,
21047            },
21048        )?;
21049        __struct.target_system = buf.get_u8();
21050        __struct.target_component = buf.get_u8();
21051        let tmp = buf.get_u8();
21052        __struct.frame =
21053            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21054                enum_type: "MavFrame",
21055                value: tmp as u64,
21056            })?;
21057        __struct.current = buf.get_u8();
21058        __struct.autocontinue = buf.get_u8();
21059        let tmp = buf.get_u8();
21060        __struct.mission_type =
21061            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21062                enum_type: "MavMissionType",
21063                value: tmp as u64,
21064            })?;
21065        Ok(__struct)
21066    }
21067    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21068        let mut __tmp = BytesMut::new(bytes);
21069        #[allow(clippy::absurd_extreme_comparisons)]
21070        #[allow(unused_comparisons)]
21071        if __tmp.remaining() < Self::ENCODED_LEN {
21072            panic!(
21073                "buffer is too small (need {} bytes, but got {})",
21074                Self::ENCODED_LEN,
21075                __tmp.remaining(),
21076            )
21077        }
21078        __tmp.put_f32_le(self.param1);
21079        __tmp.put_f32_le(self.param2);
21080        __tmp.put_f32_le(self.param3);
21081        __tmp.put_f32_le(self.param4);
21082        __tmp.put_i32_le(self.x);
21083        __tmp.put_i32_le(self.y);
21084        __tmp.put_f32_le(self.z);
21085        __tmp.put_u16_le(self.seq);
21086        __tmp.put_u16_le(self.command as u16);
21087        __tmp.put_u8(self.target_system);
21088        __tmp.put_u8(self.target_component);
21089        __tmp.put_u8(self.frame as u8);
21090        __tmp.put_u8(self.current);
21091        __tmp.put_u8(self.autocontinue);
21092        if matches!(version, MavlinkVersion::V2) {
21093            __tmp.put_u8(self.mission_type as u8);
21094            let len = __tmp.len();
21095            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21096        } else {
21097            __tmp.len()
21098        }
21099    }
21100}
21101#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
21102#[doc = ""]
21103#[doc = "ID: 46"]
21104#[derive(Debug, Clone, PartialEq)]
21105#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21107#[cfg_attr(feature = "ts", derive(TS))]
21108#[cfg_attr(feature = "ts", ts(export))]
21109pub struct MISSION_ITEM_REACHED_DATA {
21110    #[doc = "Sequence"]
21111    pub seq: u16,
21112}
21113impl MISSION_ITEM_REACHED_DATA {
21114    pub const ENCODED_LEN: usize = 2usize;
21115    pub const DEFAULT: Self = Self { seq: 0_u16 };
21116    #[cfg(feature = "arbitrary")]
21117    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21118        use arbitrary::{Arbitrary, Unstructured};
21119        let mut buf = [0u8; 1024];
21120        rng.fill_bytes(&mut buf);
21121        let mut unstructured = Unstructured::new(&buf);
21122        Self::arbitrary(&mut unstructured).unwrap_or_default()
21123    }
21124}
21125impl Default for MISSION_ITEM_REACHED_DATA {
21126    fn default() -> Self {
21127        Self::DEFAULT.clone()
21128    }
21129}
21130impl MessageData for MISSION_ITEM_REACHED_DATA {
21131    type Message = MavMessage;
21132    const ID: u32 = 46u32;
21133    const NAME: &'static str = "MISSION_ITEM_REACHED";
21134    const EXTRA_CRC: u8 = 11u8;
21135    const ENCODED_LEN: usize = 2usize;
21136    fn deser(
21137        _version: MavlinkVersion,
21138        __input: &[u8],
21139    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21140        let avail_len = __input.len();
21141        let mut payload_buf = [0; Self::ENCODED_LEN];
21142        let mut buf = if avail_len < Self::ENCODED_LEN {
21143            payload_buf[0..avail_len].copy_from_slice(__input);
21144            Bytes::new(&payload_buf)
21145        } else {
21146            Bytes::new(__input)
21147        };
21148        let mut __struct = Self::default();
21149        __struct.seq = buf.get_u16_le();
21150        Ok(__struct)
21151    }
21152    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21153        let mut __tmp = BytesMut::new(bytes);
21154        #[allow(clippy::absurd_extreme_comparisons)]
21155        #[allow(unused_comparisons)]
21156        if __tmp.remaining() < Self::ENCODED_LEN {
21157            panic!(
21158                "buffer is too small (need {} bytes, but got {})",
21159                Self::ENCODED_LEN,
21160                __tmp.remaining(),
21161            )
21162        }
21163        __tmp.put_u16_le(self.seq);
21164        if matches!(version, MavlinkVersion::V2) {
21165            let len = __tmp.len();
21166            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21167        } else {
21168            __tmp.len()
21169        }
21170    }
21171}
21172#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
21173#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
21174#[doc = ""]
21175#[doc = "ID: 40"]
21176#[derive(Debug, Clone, PartialEq)]
21177#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21178#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21179#[cfg_attr(feature = "ts", derive(TS))]
21180#[cfg_attr(feature = "ts", ts(export))]
21181pub struct MISSION_REQUEST_DATA {
21182    #[doc = "Sequence"]
21183    pub seq: u16,
21184    #[doc = "System ID"]
21185    pub target_system: u8,
21186    #[doc = "Component ID"]
21187    pub target_component: u8,
21188    #[doc = "Mission type."]
21189    #[cfg_attr(feature = "serde", serde(default))]
21190    pub mission_type: MavMissionType,
21191}
21192impl MISSION_REQUEST_DATA {
21193    pub const ENCODED_LEN: usize = 5usize;
21194    pub const DEFAULT: Self = Self {
21195        seq: 0_u16,
21196        target_system: 0_u8,
21197        target_component: 0_u8,
21198        mission_type: MavMissionType::DEFAULT,
21199    };
21200    #[cfg(feature = "arbitrary")]
21201    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21202        use arbitrary::{Arbitrary, Unstructured};
21203        let mut buf = [0u8; 1024];
21204        rng.fill_bytes(&mut buf);
21205        let mut unstructured = Unstructured::new(&buf);
21206        Self::arbitrary(&mut unstructured).unwrap_or_default()
21207    }
21208}
21209impl Default for MISSION_REQUEST_DATA {
21210    fn default() -> Self {
21211        Self::DEFAULT.clone()
21212    }
21213}
21214impl MessageData for MISSION_REQUEST_DATA {
21215    type Message = MavMessage;
21216    const ID: u32 = 40u32;
21217    const NAME: &'static str = "MISSION_REQUEST";
21218    const EXTRA_CRC: u8 = 230u8;
21219    const ENCODED_LEN: usize = 5usize;
21220    fn deser(
21221        _version: MavlinkVersion,
21222        __input: &[u8],
21223    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21224        let avail_len = __input.len();
21225        let mut payload_buf = [0; Self::ENCODED_LEN];
21226        let mut buf = if avail_len < Self::ENCODED_LEN {
21227            payload_buf[0..avail_len].copy_from_slice(__input);
21228            Bytes::new(&payload_buf)
21229        } else {
21230            Bytes::new(__input)
21231        };
21232        let mut __struct = Self::default();
21233        __struct.seq = buf.get_u16_le();
21234        __struct.target_system = buf.get_u8();
21235        __struct.target_component = buf.get_u8();
21236        let tmp = buf.get_u8();
21237        __struct.mission_type =
21238            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21239                enum_type: "MavMissionType",
21240                value: tmp as u64,
21241            })?;
21242        Ok(__struct)
21243    }
21244    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21245        let mut __tmp = BytesMut::new(bytes);
21246        #[allow(clippy::absurd_extreme_comparisons)]
21247        #[allow(unused_comparisons)]
21248        if __tmp.remaining() < Self::ENCODED_LEN {
21249            panic!(
21250                "buffer is too small (need {} bytes, but got {})",
21251                Self::ENCODED_LEN,
21252                __tmp.remaining(),
21253            )
21254        }
21255        __tmp.put_u16_le(self.seq);
21256        __tmp.put_u8(self.target_system);
21257        __tmp.put_u8(self.target_component);
21258        if matches!(version, MavlinkVersion::V2) {
21259            __tmp.put_u8(self.mission_type as u8);
21260            let len = __tmp.len();
21261            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21262        } else {
21263            __tmp.len()
21264        }
21265    }
21266}
21267#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
21268#[doc = ""]
21269#[doc = "ID: 51"]
21270#[derive(Debug, Clone, PartialEq)]
21271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21273#[cfg_attr(feature = "ts", derive(TS))]
21274#[cfg_attr(feature = "ts", ts(export))]
21275pub struct MISSION_REQUEST_INT_DATA {
21276    #[doc = "Sequence"]
21277    pub seq: u16,
21278    #[doc = "System ID"]
21279    pub target_system: u8,
21280    #[doc = "Component ID"]
21281    pub target_component: u8,
21282    #[doc = "Mission type."]
21283    #[cfg_attr(feature = "serde", serde(default))]
21284    pub mission_type: MavMissionType,
21285}
21286impl MISSION_REQUEST_INT_DATA {
21287    pub const ENCODED_LEN: usize = 5usize;
21288    pub const DEFAULT: Self = Self {
21289        seq: 0_u16,
21290        target_system: 0_u8,
21291        target_component: 0_u8,
21292        mission_type: MavMissionType::DEFAULT,
21293    };
21294    #[cfg(feature = "arbitrary")]
21295    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21296        use arbitrary::{Arbitrary, Unstructured};
21297        let mut buf = [0u8; 1024];
21298        rng.fill_bytes(&mut buf);
21299        let mut unstructured = Unstructured::new(&buf);
21300        Self::arbitrary(&mut unstructured).unwrap_or_default()
21301    }
21302}
21303impl Default for MISSION_REQUEST_INT_DATA {
21304    fn default() -> Self {
21305        Self::DEFAULT.clone()
21306    }
21307}
21308impl MessageData for MISSION_REQUEST_INT_DATA {
21309    type Message = MavMessage;
21310    const ID: u32 = 51u32;
21311    const NAME: &'static str = "MISSION_REQUEST_INT";
21312    const EXTRA_CRC: u8 = 196u8;
21313    const ENCODED_LEN: usize = 5usize;
21314    fn deser(
21315        _version: MavlinkVersion,
21316        __input: &[u8],
21317    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21318        let avail_len = __input.len();
21319        let mut payload_buf = [0; Self::ENCODED_LEN];
21320        let mut buf = if avail_len < Self::ENCODED_LEN {
21321            payload_buf[0..avail_len].copy_from_slice(__input);
21322            Bytes::new(&payload_buf)
21323        } else {
21324            Bytes::new(__input)
21325        };
21326        let mut __struct = Self::default();
21327        __struct.seq = buf.get_u16_le();
21328        __struct.target_system = buf.get_u8();
21329        __struct.target_component = buf.get_u8();
21330        let tmp = buf.get_u8();
21331        __struct.mission_type =
21332            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21333                enum_type: "MavMissionType",
21334                value: tmp as u64,
21335            })?;
21336        Ok(__struct)
21337    }
21338    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21339        let mut __tmp = BytesMut::new(bytes);
21340        #[allow(clippy::absurd_extreme_comparisons)]
21341        #[allow(unused_comparisons)]
21342        if __tmp.remaining() < Self::ENCODED_LEN {
21343            panic!(
21344                "buffer is too small (need {} bytes, but got {})",
21345                Self::ENCODED_LEN,
21346                __tmp.remaining(),
21347            )
21348        }
21349        __tmp.put_u16_le(self.seq);
21350        __tmp.put_u8(self.target_system);
21351        __tmp.put_u8(self.target_component);
21352        if matches!(version, MavlinkVersion::V2) {
21353            __tmp.put_u8(self.mission_type as u8);
21354            let len = __tmp.len();
21355            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21356        } else {
21357            __tmp.len()
21358        }
21359    }
21360}
21361#[doc = "Request the overall list of mission items from the system/component."]
21362#[doc = ""]
21363#[doc = "ID: 43"]
21364#[derive(Debug, Clone, PartialEq)]
21365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21366#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21367#[cfg_attr(feature = "ts", derive(TS))]
21368#[cfg_attr(feature = "ts", ts(export))]
21369pub struct MISSION_REQUEST_LIST_DATA {
21370    #[doc = "System ID"]
21371    pub target_system: u8,
21372    #[doc = "Component ID"]
21373    pub target_component: u8,
21374    #[doc = "Mission type."]
21375    #[cfg_attr(feature = "serde", serde(default))]
21376    pub mission_type: MavMissionType,
21377}
21378impl MISSION_REQUEST_LIST_DATA {
21379    pub const ENCODED_LEN: usize = 3usize;
21380    pub const DEFAULT: Self = Self {
21381        target_system: 0_u8,
21382        target_component: 0_u8,
21383        mission_type: MavMissionType::DEFAULT,
21384    };
21385    #[cfg(feature = "arbitrary")]
21386    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21387        use arbitrary::{Arbitrary, Unstructured};
21388        let mut buf = [0u8; 1024];
21389        rng.fill_bytes(&mut buf);
21390        let mut unstructured = Unstructured::new(&buf);
21391        Self::arbitrary(&mut unstructured).unwrap_or_default()
21392    }
21393}
21394impl Default for MISSION_REQUEST_LIST_DATA {
21395    fn default() -> Self {
21396        Self::DEFAULT.clone()
21397    }
21398}
21399impl MessageData for MISSION_REQUEST_LIST_DATA {
21400    type Message = MavMessage;
21401    const ID: u32 = 43u32;
21402    const NAME: &'static str = "MISSION_REQUEST_LIST";
21403    const EXTRA_CRC: u8 = 132u8;
21404    const ENCODED_LEN: usize = 3usize;
21405    fn deser(
21406        _version: MavlinkVersion,
21407        __input: &[u8],
21408    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21409        let avail_len = __input.len();
21410        let mut payload_buf = [0; Self::ENCODED_LEN];
21411        let mut buf = if avail_len < Self::ENCODED_LEN {
21412            payload_buf[0..avail_len].copy_from_slice(__input);
21413            Bytes::new(&payload_buf)
21414        } else {
21415            Bytes::new(__input)
21416        };
21417        let mut __struct = Self::default();
21418        __struct.target_system = buf.get_u8();
21419        __struct.target_component = buf.get_u8();
21420        let tmp = buf.get_u8();
21421        __struct.mission_type =
21422            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21423                enum_type: "MavMissionType",
21424                value: tmp as u64,
21425            })?;
21426        Ok(__struct)
21427    }
21428    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21429        let mut __tmp = BytesMut::new(bytes);
21430        #[allow(clippy::absurd_extreme_comparisons)]
21431        #[allow(unused_comparisons)]
21432        if __tmp.remaining() < Self::ENCODED_LEN {
21433            panic!(
21434                "buffer is too small (need {} bytes, but got {})",
21435                Self::ENCODED_LEN,
21436                __tmp.remaining(),
21437            )
21438        }
21439        __tmp.put_u8(self.target_system);
21440        __tmp.put_u8(self.target_component);
21441        if matches!(version, MavlinkVersion::V2) {
21442            __tmp.put_u8(self.mission_type as u8);
21443            let len = __tmp.len();
21444            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21445        } else {
21446            __tmp.len()
21447        }
21448    }
21449}
21450#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
21451#[doc = ""]
21452#[doc = "ID: 37"]
21453#[derive(Debug, Clone, PartialEq)]
21454#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21455#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21456#[cfg_attr(feature = "ts", derive(TS))]
21457#[cfg_attr(feature = "ts", ts(export))]
21458pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
21459    #[doc = "Start index"]
21460    pub start_index: i16,
21461    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
21462    pub end_index: i16,
21463    #[doc = "System ID"]
21464    pub target_system: u8,
21465    #[doc = "Component ID"]
21466    pub target_component: u8,
21467    #[doc = "Mission type."]
21468    #[cfg_attr(feature = "serde", serde(default))]
21469    pub mission_type: MavMissionType,
21470}
21471impl MISSION_REQUEST_PARTIAL_LIST_DATA {
21472    pub const ENCODED_LEN: usize = 7usize;
21473    pub const DEFAULT: Self = Self {
21474        start_index: 0_i16,
21475        end_index: 0_i16,
21476        target_system: 0_u8,
21477        target_component: 0_u8,
21478        mission_type: MavMissionType::DEFAULT,
21479    };
21480    #[cfg(feature = "arbitrary")]
21481    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21482        use arbitrary::{Arbitrary, Unstructured};
21483        let mut buf = [0u8; 1024];
21484        rng.fill_bytes(&mut buf);
21485        let mut unstructured = Unstructured::new(&buf);
21486        Self::arbitrary(&mut unstructured).unwrap_or_default()
21487    }
21488}
21489impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
21490    fn default() -> Self {
21491        Self::DEFAULT.clone()
21492    }
21493}
21494impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
21495    type Message = MavMessage;
21496    const ID: u32 = 37u32;
21497    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
21498    const EXTRA_CRC: u8 = 212u8;
21499    const ENCODED_LEN: usize = 7usize;
21500    fn deser(
21501        _version: MavlinkVersion,
21502        __input: &[u8],
21503    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21504        let avail_len = __input.len();
21505        let mut payload_buf = [0; Self::ENCODED_LEN];
21506        let mut buf = if avail_len < Self::ENCODED_LEN {
21507            payload_buf[0..avail_len].copy_from_slice(__input);
21508            Bytes::new(&payload_buf)
21509        } else {
21510            Bytes::new(__input)
21511        };
21512        let mut __struct = Self::default();
21513        __struct.start_index = buf.get_i16_le();
21514        __struct.end_index = buf.get_i16_le();
21515        __struct.target_system = buf.get_u8();
21516        __struct.target_component = buf.get_u8();
21517        let tmp = buf.get_u8();
21518        __struct.mission_type =
21519            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21520                enum_type: "MavMissionType",
21521                value: tmp as u64,
21522            })?;
21523        Ok(__struct)
21524    }
21525    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21526        let mut __tmp = BytesMut::new(bytes);
21527        #[allow(clippy::absurd_extreme_comparisons)]
21528        #[allow(unused_comparisons)]
21529        if __tmp.remaining() < Self::ENCODED_LEN {
21530            panic!(
21531                "buffer is too small (need {} bytes, but got {})",
21532                Self::ENCODED_LEN,
21533                __tmp.remaining(),
21534            )
21535        }
21536        __tmp.put_i16_le(self.start_index);
21537        __tmp.put_i16_le(self.end_index);
21538        __tmp.put_u8(self.target_system);
21539        __tmp.put_u8(self.target_component);
21540        if matches!(version, MavlinkVersion::V2) {
21541            __tmp.put_u8(self.mission_type as u8);
21542            let len = __tmp.len();
21543            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21544        } else {
21545            __tmp.len()
21546        }
21547    }
21548}
21549#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
21550#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
21551#[doc = ""]
21552#[doc = "ID: 41"]
21553#[derive(Debug, Clone, PartialEq)]
21554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21555#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21556#[cfg_attr(feature = "ts", derive(TS))]
21557#[cfg_attr(feature = "ts", ts(export))]
21558pub struct MISSION_SET_CURRENT_DATA {
21559    #[doc = "Sequence"]
21560    pub seq: u16,
21561    #[doc = "System ID"]
21562    pub target_system: u8,
21563    #[doc = "Component ID"]
21564    pub target_component: u8,
21565}
21566impl MISSION_SET_CURRENT_DATA {
21567    pub const ENCODED_LEN: usize = 4usize;
21568    pub const DEFAULT: Self = Self {
21569        seq: 0_u16,
21570        target_system: 0_u8,
21571        target_component: 0_u8,
21572    };
21573    #[cfg(feature = "arbitrary")]
21574    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21575        use arbitrary::{Arbitrary, Unstructured};
21576        let mut buf = [0u8; 1024];
21577        rng.fill_bytes(&mut buf);
21578        let mut unstructured = Unstructured::new(&buf);
21579        Self::arbitrary(&mut unstructured).unwrap_or_default()
21580    }
21581}
21582impl Default for MISSION_SET_CURRENT_DATA {
21583    fn default() -> Self {
21584        Self::DEFAULT.clone()
21585    }
21586}
21587impl MessageData for MISSION_SET_CURRENT_DATA {
21588    type Message = MavMessage;
21589    const ID: u32 = 41u32;
21590    const NAME: &'static str = "MISSION_SET_CURRENT";
21591    const EXTRA_CRC: u8 = 28u8;
21592    const ENCODED_LEN: usize = 4usize;
21593    fn deser(
21594        _version: MavlinkVersion,
21595        __input: &[u8],
21596    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21597        let avail_len = __input.len();
21598        let mut payload_buf = [0; Self::ENCODED_LEN];
21599        let mut buf = if avail_len < Self::ENCODED_LEN {
21600            payload_buf[0..avail_len].copy_from_slice(__input);
21601            Bytes::new(&payload_buf)
21602        } else {
21603            Bytes::new(__input)
21604        };
21605        let mut __struct = Self::default();
21606        __struct.seq = buf.get_u16_le();
21607        __struct.target_system = buf.get_u8();
21608        __struct.target_component = buf.get_u8();
21609        Ok(__struct)
21610    }
21611    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21612        let mut __tmp = BytesMut::new(bytes);
21613        #[allow(clippy::absurd_extreme_comparisons)]
21614        #[allow(unused_comparisons)]
21615        if __tmp.remaining() < Self::ENCODED_LEN {
21616            panic!(
21617                "buffer is too small (need {} bytes, but got {})",
21618                Self::ENCODED_LEN,
21619                __tmp.remaining(),
21620            )
21621        }
21622        __tmp.put_u16_le(self.seq);
21623        __tmp.put_u8(self.target_system);
21624        __tmp.put_u8(self.target_component);
21625        if matches!(version, MavlinkVersion::V2) {
21626            let len = __tmp.len();
21627            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21628        } else {
21629            __tmp.len()
21630        }
21631    }
21632}
21633#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
21634#[doc = ""]
21635#[doc = "ID: 38"]
21636#[derive(Debug, Clone, PartialEq)]
21637#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21638#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21639#[cfg_attr(feature = "ts", derive(TS))]
21640#[cfg_attr(feature = "ts", ts(export))]
21641pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
21642    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
21643    pub start_index: i16,
21644    #[doc = "End index, equal or greater than start index."]
21645    pub end_index: i16,
21646    #[doc = "System ID"]
21647    pub target_system: u8,
21648    #[doc = "Component ID"]
21649    pub target_component: u8,
21650    #[doc = "Mission type."]
21651    #[cfg_attr(feature = "serde", serde(default))]
21652    pub mission_type: MavMissionType,
21653}
21654impl MISSION_WRITE_PARTIAL_LIST_DATA {
21655    pub const ENCODED_LEN: usize = 7usize;
21656    pub const DEFAULT: Self = Self {
21657        start_index: 0_i16,
21658        end_index: 0_i16,
21659        target_system: 0_u8,
21660        target_component: 0_u8,
21661        mission_type: MavMissionType::DEFAULT,
21662    };
21663    #[cfg(feature = "arbitrary")]
21664    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21665        use arbitrary::{Arbitrary, Unstructured};
21666        let mut buf = [0u8; 1024];
21667        rng.fill_bytes(&mut buf);
21668        let mut unstructured = Unstructured::new(&buf);
21669        Self::arbitrary(&mut unstructured).unwrap_or_default()
21670    }
21671}
21672impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
21673    fn default() -> Self {
21674        Self::DEFAULT.clone()
21675    }
21676}
21677impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
21678    type Message = MavMessage;
21679    const ID: u32 = 38u32;
21680    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
21681    const EXTRA_CRC: u8 = 9u8;
21682    const ENCODED_LEN: usize = 7usize;
21683    fn deser(
21684        _version: MavlinkVersion,
21685        __input: &[u8],
21686    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21687        let avail_len = __input.len();
21688        let mut payload_buf = [0; Self::ENCODED_LEN];
21689        let mut buf = if avail_len < Self::ENCODED_LEN {
21690            payload_buf[0..avail_len].copy_from_slice(__input);
21691            Bytes::new(&payload_buf)
21692        } else {
21693            Bytes::new(__input)
21694        };
21695        let mut __struct = Self::default();
21696        __struct.start_index = buf.get_i16_le();
21697        __struct.end_index = buf.get_i16_le();
21698        __struct.target_system = buf.get_u8();
21699        __struct.target_component = buf.get_u8();
21700        let tmp = buf.get_u8();
21701        __struct.mission_type =
21702            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21703                enum_type: "MavMissionType",
21704                value: tmp as u64,
21705            })?;
21706        Ok(__struct)
21707    }
21708    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21709        let mut __tmp = BytesMut::new(bytes);
21710        #[allow(clippy::absurd_extreme_comparisons)]
21711        #[allow(unused_comparisons)]
21712        if __tmp.remaining() < Self::ENCODED_LEN {
21713            panic!(
21714                "buffer is too small (need {} bytes, but got {})",
21715                Self::ENCODED_LEN,
21716                __tmp.remaining(),
21717            )
21718        }
21719        __tmp.put_i16_le(self.start_index);
21720        __tmp.put_i16_le(self.end_index);
21721        __tmp.put_u8(self.target_system);
21722        __tmp.put_u8(self.target_component);
21723        if matches!(version, MavlinkVersion::V2) {
21724            __tmp.put_u8(self.mission_type as u8);
21725            let len = __tmp.len();
21726            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21727        } else {
21728            __tmp.len()
21729        }
21730    }
21731}
21732#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
21733#[doc = "Orientation of a mount."]
21734#[doc = ""]
21735#[doc = "ID: 265"]
21736#[derive(Debug, Clone, PartialEq)]
21737#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21738#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21739#[cfg_attr(feature = "ts", derive(TS))]
21740#[cfg_attr(feature = "ts", ts(export))]
21741pub struct MOUNT_ORIENTATION_DATA {
21742    #[doc = "Timestamp (time since system boot)."]
21743    pub time_boot_ms: u32,
21744    #[doc = "Roll in global frame (set to NaN for invalid)."]
21745    pub roll: f32,
21746    #[doc = "Pitch in global frame (set to NaN for invalid)."]
21747    pub pitch: f32,
21748    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
21749    pub yaw: f32,
21750    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
21751    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21752    pub yaw_absolute: f32,
21753}
21754impl MOUNT_ORIENTATION_DATA {
21755    pub const ENCODED_LEN: usize = 20usize;
21756    pub const DEFAULT: Self = Self {
21757        time_boot_ms: 0_u32,
21758        roll: 0.0_f32,
21759        pitch: 0.0_f32,
21760        yaw: 0.0_f32,
21761        yaw_absolute: 0.0_f32,
21762    };
21763    #[cfg(feature = "arbitrary")]
21764    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21765        use arbitrary::{Arbitrary, Unstructured};
21766        let mut buf = [0u8; 1024];
21767        rng.fill_bytes(&mut buf);
21768        let mut unstructured = Unstructured::new(&buf);
21769        Self::arbitrary(&mut unstructured).unwrap_or_default()
21770    }
21771}
21772impl Default for MOUNT_ORIENTATION_DATA {
21773    fn default() -> Self {
21774        Self::DEFAULT.clone()
21775    }
21776}
21777impl MessageData for MOUNT_ORIENTATION_DATA {
21778    type Message = MavMessage;
21779    const ID: u32 = 265u32;
21780    const NAME: &'static str = "MOUNT_ORIENTATION";
21781    const EXTRA_CRC: u8 = 26u8;
21782    const ENCODED_LEN: usize = 20usize;
21783    fn deser(
21784        _version: MavlinkVersion,
21785        __input: &[u8],
21786    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21787        let avail_len = __input.len();
21788        let mut payload_buf = [0; Self::ENCODED_LEN];
21789        let mut buf = if avail_len < Self::ENCODED_LEN {
21790            payload_buf[0..avail_len].copy_from_slice(__input);
21791            Bytes::new(&payload_buf)
21792        } else {
21793            Bytes::new(__input)
21794        };
21795        let mut __struct = Self::default();
21796        __struct.time_boot_ms = buf.get_u32_le();
21797        __struct.roll = buf.get_f32_le();
21798        __struct.pitch = buf.get_f32_le();
21799        __struct.yaw = buf.get_f32_le();
21800        __struct.yaw_absolute = buf.get_f32_le();
21801        Ok(__struct)
21802    }
21803    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21804        let mut __tmp = BytesMut::new(bytes);
21805        #[allow(clippy::absurd_extreme_comparisons)]
21806        #[allow(unused_comparisons)]
21807        if __tmp.remaining() < Self::ENCODED_LEN {
21808            panic!(
21809                "buffer is too small (need {} bytes, but got {})",
21810                Self::ENCODED_LEN,
21811                __tmp.remaining(),
21812            )
21813        }
21814        __tmp.put_u32_le(self.time_boot_ms);
21815        __tmp.put_f32_le(self.roll);
21816        __tmp.put_f32_le(self.pitch);
21817        __tmp.put_f32_le(self.yaw);
21818        if matches!(version, MavlinkVersion::V2) {
21819            __tmp.put_f32_le(self.yaw_absolute);
21820            let len = __tmp.len();
21821            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21822        } else {
21823            __tmp.len()
21824        }
21825    }
21826}
21827#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21828#[doc = ""]
21829#[doc = "ID: 251"]
21830#[derive(Debug, Clone, PartialEq)]
21831#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21832#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21833#[cfg_attr(feature = "ts", derive(TS))]
21834#[cfg_attr(feature = "ts", ts(export))]
21835pub struct NAMED_VALUE_FLOAT_DATA {
21836    #[doc = "Timestamp (time since system boot)."]
21837    pub time_boot_ms: u32,
21838    #[doc = "Floating point value"]
21839    pub value: f32,
21840    #[doc = "Name of the debug variable"]
21841    #[cfg_attr(feature = "ts", ts(type = "string"))]
21842    pub name: CharArray<10>,
21843}
21844impl NAMED_VALUE_FLOAT_DATA {
21845    pub const ENCODED_LEN: usize = 18usize;
21846    pub const DEFAULT: Self = Self {
21847        time_boot_ms: 0_u32,
21848        value: 0.0_f32,
21849        name: CharArray::new([0_u8; 10usize]),
21850    };
21851    #[cfg(feature = "arbitrary")]
21852    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21853        use arbitrary::{Arbitrary, Unstructured};
21854        let mut buf = [0u8; 1024];
21855        rng.fill_bytes(&mut buf);
21856        let mut unstructured = Unstructured::new(&buf);
21857        Self::arbitrary(&mut unstructured).unwrap_or_default()
21858    }
21859}
21860impl Default for NAMED_VALUE_FLOAT_DATA {
21861    fn default() -> Self {
21862        Self::DEFAULT.clone()
21863    }
21864}
21865impl MessageData for NAMED_VALUE_FLOAT_DATA {
21866    type Message = MavMessage;
21867    const ID: u32 = 251u32;
21868    const NAME: &'static str = "NAMED_VALUE_FLOAT";
21869    const EXTRA_CRC: u8 = 170u8;
21870    const ENCODED_LEN: usize = 18usize;
21871    fn deser(
21872        _version: MavlinkVersion,
21873        __input: &[u8],
21874    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21875        let avail_len = __input.len();
21876        let mut payload_buf = [0; Self::ENCODED_LEN];
21877        let mut buf = if avail_len < Self::ENCODED_LEN {
21878            payload_buf[0..avail_len].copy_from_slice(__input);
21879            Bytes::new(&payload_buf)
21880        } else {
21881            Bytes::new(__input)
21882        };
21883        let mut __struct = Self::default();
21884        __struct.time_boot_ms = buf.get_u32_le();
21885        __struct.value = buf.get_f32_le();
21886        let mut tmp = [0_u8; 10usize];
21887        for v in &mut tmp {
21888            *v = buf.get_u8();
21889        }
21890        __struct.name = CharArray::new(tmp);
21891        Ok(__struct)
21892    }
21893    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21894        let mut __tmp = BytesMut::new(bytes);
21895        #[allow(clippy::absurd_extreme_comparisons)]
21896        #[allow(unused_comparisons)]
21897        if __tmp.remaining() < Self::ENCODED_LEN {
21898            panic!(
21899                "buffer is too small (need {} bytes, but got {})",
21900                Self::ENCODED_LEN,
21901                __tmp.remaining(),
21902            )
21903        }
21904        __tmp.put_u32_le(self.time_boot_ms);
21905        __tmp.put_f32_le(self.value);
21906        for val in &self.name {
21907            __tmp.put_u8(*val);
21908        }
21909        if matches!(version, MavlinkVersion::V2) {
21910            let len = __tmp.len();
21911            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21912        } else {
21913            __tmp.len()
21914        }
21915    }
21916}
21917#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21918#[doc = ""]
21919#[doc = "ID: 252"]
21920#[derive(Debug, Clone, PartialEq)]
21921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21923#[cfg_attr(feature = "ts", derive(TS))]
21924#[cfg_attr(feature = "ts", ts(export))]
21925pub struct NAMED_VALUE_INT_DATA {
21926    #[doc = "Timestamp (time since system boot)."]
21927    pub time_boot_ms: u32,
21928    #[doc = "Signed integer value"]
21929    pub value: i32,
21930    #[doc = "Name of the debug variable"]
21931    #[cfg_attr(feature = "ts", ts(type = "string"))]
21932    pub name: CharArray<10>,
21933}
21934impl NAMED_VALUE_INT_DATA {
21935    pub const ENCODED_LEN: usize = 18usize;
21936    pub const DEFAULT: Self = Self {
21937        time_boot_ms: 0_u32,
21938        value: 0_i32,
21939        name: CharArray::new([0_u8; 10usize]),
21940    };
21941    #[cfg(feature = "arbitrary")]
21942    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21943        use arbitrary::{Arbitrary, Unstructured};
21944        let mut buf = [0u8; 1024];
21945        rng.fill_bytes(&mut buf);
21946        let mut unstructured = Unstructured::new(&buf);
21947        Self::arbitrary(&mut unstructured).unwrap_or_default()
21948    }
21949}
21950impl Default for NAMED_VALUE_INT_DATA {
21951    fn default() -> Self {
21952        Self::DEFAULT.clone()
21953    }
21954}
21955impl MessageData for NAMED_VALUE_INT_DATA {
21956    type Message = MavMessage;
21957    const ID: u32 = 252u32;
21958    const NAME: &'static str = "NAMED_VALUE_INT";
21959    const EXTRA_CRC: u8 = 44u8;
21960    const ENCODED_LEN: usize = 18usize;
21961    fn deser(
21962        _version: MavlinkVersion,
21963        __input: &[u8],
21964    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21965        let avail_len = __input.len();
21966        let mut payload_buf = [0; Self::ENCODED_LEN];
21967        let mut buf = if avail_len < Self::ENCODED_LEN {
21968            payload_buf[0..avail_len].copy_from_slice(__input);
21969            Bytes::new(&payload_buf)
21970        } else {
21971            Bytes::new(__input)
21972        };
21973        let mut __struct = Self::default();
21974        __struct.time_boot_ms = buf.get_u32_le();
21975        __struct.value = buf.get_i32_le();
21976        let mut tmp = [0_u8; 10usize];
21977        for v in &mut tmp {
21978            *v = buf.get_u8();
21979        }
21980        __struct.name = CharArray::new(tmp);
21981        Ok(__struct)
21982    }
21983    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21984        let mut __tmp = BytesMut::new(bytes);
21985        #[allow(clippy::absurd_extreme_comparisons)]
21986        #[allow(unused_comparisons)]
21987        if __tmp.remaining() < Self::ENCODED_LEN {
21988            panic!(
21989                "buffer is too small (need {} bytes, but got {})",
21990                Self::ENCODED_LEN,
21991                __tmp.remaining(),
21992            )
21993        }
21994        __tmp.put_u32_le(self.time_boot_ms);
21995        __tmp.put_i32_le(self.value);
21996        for val in &self.name {
21997            __tmp.put_u8(*val);
21998        }
21999        if matches!(version, MavlinkVersion::V2) {
22000            let len = __tmp.len();
22001            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22002        } else {
22003            __tmp.len()
22004        }
22005    }
22006}
22007#[doc = "The state of the navigation and position controller."]
22008#[doc = ""]
22009#[doc = "ID: 62"]
22010#[derive(Debug, Clone, PartialEq)]
22011#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22012#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22013#[cfg_attr(feature = "ts", derive(TS))]
22014#[cfg_attr(feature = "ts", ts(export))]
22015pub struct NAV_CONTROLLER_OUTPUT_DATA {
22016    #[doc = "Current desired roll"]
22017    pub nav_roll: f32,
22018    #[doc = "Current desired pitch"]
22019    pub nav_pitch: f32,
22020    #[doc = "Current altitude error"]
22021    pub alt_error: f32,
22022    #[doc = "Current airspeed error"]
22023    pub aspd_error: f32,
22024    #[doc = "Current crosstrack error on x-y plane"]
22025    pub xtrack_error: f32,
22026    #[doc = "Current desired heading"]
22027    pub nav_bearing: i16,
22028    #[doc = "Bearing to current waypoint/target"]
22029    pub target_bearing: i16,
22030    #[doc = "Distance to active waypoint"]
22031    pub wp_dist: u16,
22032}
22033impl NAV_CONTROLLER_OUTPUT_DATA {
22034    pub const ENCODED_LEN: usize = 26usize;
22035    pub const DEFAULT: Self = Self {
22036        nav_roll: 0.0_f32,
22037        nav_pitch: 0.0_f32,
22038        alt_error: 0.0_f32,
22039        aspd_error: 0.0_f32,
22040        xtrack_error: 0.0_f32,
22041        nav_bearing: 0_i16,
22042        target_bearing: 0_i16,
22043        wp_dist: 0_u16,
22044    };
22045    #[cfg(feature = "arbitrary")]
22046    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22047        use arbitrary::{Arbitrary, Unstructured};
22048        let mut buf = [0u8; 1024];
22049        rng.fill_bytes(&mut buf);
22050        let mut unstructured = Unstructured::new(&buf);
22051        Self::arbitrary(&mut unstructured).unwrap_or_default()
22052    }
22053}
22054impl Default for NAV_CONTROLLER_OUTPUT_DATA {
22055    fn default() -> Self {
22056        Self::DEFAULT.clone()
22057    }
22058}
22059impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
22060    type Message = MavMessage;
22061    const ID: u32 = 62u32;
22062    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
22063    const EXTRA_CRC: u8 = 183u8;
22064    const ENCODED_LEN: usize = 26usize;
22065    fn deser(
22066        _version: MavlinkVersion,
22067        __input: &[u8],
22068    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22069        let avail_len = __input.len();
22070        let mut payload_buf = [0; Self::ENCODED_LEN];
22071        let mut buf = if avail_len < Self::ENCODED_LEN {
22072            payload_buf[0..avail_len].copy_from_slice(__input);
22073            Bytes::new(&payload_buf)
22074        } else {
22075            Bytes::new(__input)
22076        };
22077        let mut __struct = Self::default();
22078        __struct.nav_roll = buf.get_f32_le();
22079        __struct.nav_pitch = buf.get_f32_le();
22080        __struct.alt_error = buf.get_f32_le();
22081        __struct.aspd_error = buf.get_f32_le();
22082        __struct.xtrack_error = buf.get_f32_le();
22083        __struct.nav_bearing = buf.get_i16_le();
22084        __struct.target_bearing = buf.get_i16_le();
22085        __struct.wp_dist = buf.get_u16_le();
22086        Ok(__struct)
22087    }
22088    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22089        let mut __tmp = BytesMut::new(bytes);
22090        #[allow(clippy::absurd_extreme_comparisons)]
22091        #[allow(unused_comparisons)]
22092        if __tmp.remaining() < Self::ENCODED_LEN {
22093            panic!(
22094                "buffer is too small (need {} bytes, but got {})",
22095                Self::ENCODED_LEN,
22096                __tmp.remaining(),
22097            )
22098        }
22099        __tmp.put_f32_le(self.nav_roll);
22100        __tmp.put_f32_le(self.nav_pitch);
22101        __tmp.put_f32_le(self.alt_error);
22102        __tmp.put_f32_le(self.aspd_error);
22103        __tmp.put_f32_le(self.xtrack_error);
22104        __tmp.put_i16_le(self.nav_bearing);
22105        __tmp.put_i16_le(self.target_bearing);
22106        __tmp.put_u16_le(self.wp_dist);
22107        if matches!(version, MavlinkVersion::V2) {
22108            let len = __tmp.len();
22109            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22110        } else {
22111            __tmp.len()
22112        }
22113    }
22114}
22115#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
22116#[doc = ""]
22117#[doc = "ID: 330"]
22118#[derive(Debug, Clone, PartialEq)]
22119#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22120#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22121#[cfg_attr(feature = "ts", derive(TS))]
22122#[cfg_attr(feature = "ts", ts(export))]
22123pub struct OBSTACLE_DISTANCE_DATA {
22124    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22125    pub time_usec: u64,
22126    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
22127    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22128    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22129    pub distances: [u16; 72],
22130    #[doc = "Minimum distance the sensor can measure."]
22131    pub min_distance: u16,
22132    #[doc = "Maximum distance the sensor can measure."]
22133    pub max_distance: u16,
22134    #[doc = "Class id of the distance sensor type."]
22135    pub sensor_type: MavDistanceSensor,
22136    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
22137    pub increment: u8,
22138    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
22139    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22140    pub increment_f: f32,
22141    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
22142    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22143    pub angle_offset: f32,
22144    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
22145    #[cfg_attr(feature = "serde", serde(default))]
22146    pub frame: MavFrame,
22147}
22148impl OBSTACLE_DISTANCE_DATA {
22149    pub const ENCODED_LEN: usize = 167usize;
22150    pub const DEFAULT: Self = Self {
22151        time_usec: 0_u64,
22152        distances: [0_u16; 72usize],
22153        min_distance: 0_u16,
22154        max_distance: 0_u16,
22155        sensor_type: MavDistanceSensor::DEFAULT,
22156        increment: 0_u8,
22157        increment_f: 0.0_f32,
22158        angle_offset: 0.0_f32,
22159        frame: MavFrame::DEFAULT,
22160    };
22161    #[cfg(feature = "arbitrary")]
22162    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22163        use arbitrary::{Arbitrary, Unstructured};
22164        let mut buf = [0u8; 1024];
22165        rng.fill_bytes(&mut buf);
22166        let mut unstructured = Unstructured::new(&buf);
22167        Self::arbitrary(&mut unstructured).unwrap_or_default()
22168    }
22169}
22170impl Default for OBSTACLE_DISTANCE_DATA {
22171    fn default() -> Self {
22172        Self::DEFAULT.clone()
22173    }
22174}
22175impl MessageData for OBSTACLE_DISTANCE_DATA {
22176    type Message = MavMessage;
22177    const ID: u32 = 330u32;
22178    const NAME: &'static str = "OBSTACLE_DISTANCE";
22179    const EXTRA_CRC: u8 = 23u8;
22180    const ENCODED_LEN: usize = 167usize;
22181    fn deser(
22182        _version: MavlinkVersion,
22183        __input: &[u8],
22184    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22185        let avail_len = __input.len();
22186        let mut payload_buf = [0; Self::ENCODED_LEN];
22187        let mut buf = if avail_len < Self::ENCODED_LEN {
22188            payload_buf[0..avail_len].copy_from_slice(__input);
22189            Bytes::new(&payload_buf)
22190        } else {
22191            Bytes::new(__input)
22192        };
22193        let mut __struct = Self::default();
22194        __struct.time_usec = buf.get_u64_le();
22195        for v in &mut __struct.distances {
22196            let val = buf.get_u16_le();
22197            *v = val;
22198        }
22199        __struct.min_distance = buf.get_u16_le();
22200        __struct.max_distance = buf.get_u16_le();
22201        let tmp = buf.get_u8();
22202        __struct.sensor_type =
22203            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22204                enum_type: "MavDistanceSensor",
22205                value: tmp as u64,
22206            })?;
22207        __struct.increment = buf.get_u8();
22208        __struct.increment_f = buf.get_f32_le();
22209        __struct.angle_offset = buf.get_f32_le();
22210        let tmp = buf.get_u8();
22211        __struct.frame =
22212            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22213                enum_type: "MavFrame",
22214                value: tmp as u64,
22215            })?;
22216        Ok(__struct)
22217    }
22218    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22219        let mut __tmp = BytesMut::new(bytes);
22220        #[allow(clippy::absurd_extreme_comparisons)]
22221        #[allow(unused_comparisons)]
22222        if __tmp.remaining() < Self::ENCODED_LEN {
22223            panic!(
22224                "buffer is too small (need {} bytes, but got {})",
22225                Self::ENCODED_LEN,
22226                __tmp.remaining(),
22227            )
22228        }
22229        __tmp.put_u64_le(self.time_usec);
22230        for val in &self.distances {
22231            __tmp.put_u16_le(*val);
22232        }
22233        __tmp.put_u16_le(self.min_distance);
22234        __tmp.put_u16_le(self.max_distance);
22235        __tmp.put_u8(self.sensor_type as u8);
22236        __tmp.put_u8(self.increment);
22237        if matches!(version, MavlinkVersion::V2) {
22238            __tmp.put_f32_le(self.increment_f);
22239            __tmp.put_f32_le(self.angle_offset);
22240            __tmp.put_u8(self.frame as u8);
22241            let len = __tmp.len();
22242            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22243        } else {
22244            __tmp.len()
22245        }
22246    }
22247}
22248#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
22249#[doc = ""]
22250#[doc = "ID: 331"]
22251#[derive(Debug, Clone, PartialEq)]
22252#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22253#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22254#[cfg_attr(feature = "ts", derive(TS))]
22255#[cfg_attr(feature = "ts", ts(export))]
22256pub struct ODOMETRY_DATA {
22257    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22258    pub time_usec: u64,
22259    #[doc = "X Position"]
22260    pub x: f32,
22261    #[doc = "Y Position"]
22262    pub y: f32,
22263    #[doc = "Z Position"]
22264    pub z: f32,
22265    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
22266    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22267    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22268    pub q: [f32; 4],
22269    #[doc = "X linear speed"]
22270    pub vx: f32,
22271    #[doc = "Y linear speed"]
22272    pub vy: f32,
22273    #[doc = "Z linear speed"]
22274    pub vz: f32,
22275    #[doc = "Roll angular speed"]
22276    pub rollspeed: f32,
22277    #[doc = "Pitch angular speed"]
22278    pub pitchspeed: f32,
22279    #[doc = "Yaw angular speed"]
22280    pub yawspeed: f32,
22281    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
22282    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22283    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22284    pub pose_covariance: [f32; 21],
22285    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
22286    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22287    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22288    pub velocity_covariance: [f32; 21],
22289    #[doc = "Coordinate frame of reference for the pose data."]
22290    pub frame_id: MavFrame,
22291    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
22292    pub child_frame_id: MavFrame,
22293    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
22294    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22295    pub reset_counter: u8,
22296    #[doc = "Type of estimator that is providing the odometry."]
22297    #[cfg_attr(feature = "serde", serde(default))]
22298    pub estimator_type: MavEstimatorType,
22299    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
22300    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22301    pub quality: i8,
22302}
22303impl ODOMETRY_DATA {
22304    pub const ENCODED_LEN: usize = 233usize;
22305    pub const DEFAULT: Self = Self {
22306        time_usec: 0_u64,
22307        x: 0.0_f32,
22308        y: 0.0_f32,
22309        z: 0.0_f32,
22310        q: [0.0_f32; 4usize],
22311        vx: 0.0_f32,
22312        vy: 0.0_f32,
22313        vz: 0.0_f32,
22314        rollspeed: 0.0_f32,
22315        pitchspeed: 0.0_f32,
22316        yawspeed: 0.0_f32,
22317        pose_covariance: [0.0_f32; 21usize],
22318        velocity_covariance: [0.0_f32; 21usize],
22319        frame_id: MavFrame::DEFAULT,
22320        child_frame_id: MavFrame::DEFAULT,
22321        reset_counter: 0_u8,
22322        estimator_type: MavEstimatorType::DEFAULT,
22323        quality: 0_i8,
22324    };
22325    #[cfg(feature = "arbitrary")]
22326    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22327        use arbitrary::{Arbitrary, Unstructured};
22328        let mut buf = [0u8; 1024];
22329        rng.fill_bytes(&mut buf);
22330        let mut unstructured = Unstructured::new(&buf);
22331        Self::arbitrary(&mut unstructured).unwrap_or_default()
22332    }
22333}
22334impl Default for ODOMETRY_DATA {
22335    fn default() -> Self {
22336        Self::DEFAULT.clone()
22337    }
22338}
22339impl MessageData for ODOMETRY_DATA {
22340    type Message = MavMessage;
22341    const ID: u32 = 331u32;
22342    const NAME: &'static str = "ODOMETRY";
22343    const EXTRA_CRC: u8 = 91u8;
22344    const ENCODED_LEN: usize = 233usize;
22345    fn deser(
22346        _version: MavlinkVersion,
22347        __input: &[u8],
22348    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22349        let avail_len = __input.len();
22350        let mut payload_buf = [0; Self::ENCODED_LEN];
22351        let mut buf = if avail_len < Self::ENCODED_LEN {
22352            payload_buf[0..avail_len].copy_from_slice(__input);
22353            Bytes::new(&payload_buf)
22354        } else {
22355            Bytes::new(__input)
22356        };
22357        let mut __struct = Self::default();
22358        __struct.time_usec = buf.get_u64_le();
22359        __struct.x = buf.get_f32_le();
22360        __struct.y = buf.get_f32_le();
22361        __struct.z = buf.get_f32_le();
22362        for v in &mut __struct.q {
22363            let val = buf.get_f32_le();
22364            *v = val;
22365        }
22366        __struct.vx = buf.get_f32_le();
22367        __struct.vy = buf.get_f32_le();
22368        __struct.vz = buf.get_f32_le();
22369        __struct.rollspeed = buf.get_f32_le();
22370        __struct.pitchspeed = buf.get_f32_le();
22371        __struct.yawspeed = buf.get_f32_le();
22372        for v in &mut __struct.pose_covariance {
22373            let val = buf.get_f32_le();
22374            *v = val;
22375        }
22376        for v in &mut __struct.velocity_covariance {
22377            let val = buf.get_f32_le();
22378            *v = val;
22379        }
22380        let tmp = buf.get_u8();
22381        __struct.frame_id =
22382            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22383                enum_type: "MavFrame",
22384                value: tmp as u64,
22385            })?;
22386        let tmp = buf.get_u8();
22387        __struct.child_frame_id =
22388            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22389                enum_type: "MavFrame",
22390                value: tmp as u64,
22391            })?;
22392        __struct.reset_counter = buf.get_u8();
22393        let tmp = buf.get_u8();
22394        __struct.estimator_type =
22395            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22396                enum_type: "MavEstimatorType",
22397                value: tmp as u64,
22398            })?;
22399        __struct.quality = buf.get_i8();
22400        Ok(__struct)
22401    }
22402    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22403        let mut __tmp = BytesMut::new(bytes);
22404        #[allow(clippy::absurd_extreme_comparisons)]
22405        #[allow(unused_comparisons)]
22406        if __tmp.remaining() < Self::ENCODED_LEN {
22407            panic!(
22408                "buffer is too small (need {} bytes, but got {})",
22409                Self::ENCODED_LEN,
22410                __tmp.remaining(),
22411            )
22412        }
22413        __tmp.put_u64_le(self.time_usec);
22414        __tmp.put_f32_le(self.x);
22415        __tmp.put_f32_le(self.y);
22416        __tmp.put_f32_le(self.z);
22417        for val in &self.q {
22418            __tmp.put_f32_le(*val);
22419        }
22420        __tmp.put_f32_le(self.vx);
22421        __tmp.put_f32_le(self.vy);
22422        __tmp.put_f32_le(self.vz);
22423        __tmp.put_f32_le(self.rollspeed);
22424        __tmp.put_f32_le(self.pitchspeed);
22425        __tmp.put_f32_le(self.yawspeed);
22426        for val in &self.pose_covariance {
22427            __tmp.put_f32_le(*val);
22428        }
22429        for val in &self.velocity_covariance {
22430            __tmp.put_f32_le(*val);
22431        }
22432        __tmp.put_u8(self.frame_id as u8);
22433        __tmp.put_u8(self.child_frame_id as u8);
22434        if matches!(version, MavlinkVersion::V2) {
22435            __tmp.put_u8(self.reset_counter);
22436            __tmp.put_u8(self.estimator_type as u8);
22437            __tmp.put_i8(self.quality);
22438            let len = __tmp.len();
22439            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22440        } else {
22441            __tmp.len()
22442        }
22443    }
22444}
22445#[doc = "Hardware status sent by an onboard computer."]
22446#[doc = ""]
22447#[doc = "ID: 390"]
22448#[derive(Debug, Clone, PartialEq)]
22449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22451#[cfg_attr(feature = "ts", derive(TS))]
22452#[cfg_attr(feature = "ts", ts(export))]
22453pub struct ONBOARD_COMPUTER_STATUS_DATA {
22454    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22455    pub time_usec: u64,
22456    #[doc = "Time since system boot."]
22457    pub uptime: u32,
22458    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22459    pub ram_usage: u32,
22460    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22461    pub ram_total: u32,
22462    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
22463    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22464    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22465    pub storage_type: [u32; 4],
22466    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22467    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22468    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22469    pub storage_usage: [u32; 4],
22470    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22471    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22472    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22473    pub storage_total: [u32; 4],
22474    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
22475    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22476    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22477    pub link_type: [u32; 6],
22478    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
22479    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22480    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22481    pub link_tx_rate: [u32; 6],
22482    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
22483    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22484    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22485    pub link_rx_rate: [u32; 6],
22486    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
22487    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22488    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22489    pub link_tx_max: [u32; 6],
22490    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
22491    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22492    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22493    pub link_rx_max: [u32; 6],
22494    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
22495    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22496    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22497    pub fan_speed: [i16; 4],
22498    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
22499    pub mavtype: u8,
22500    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22501    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22502    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22503    pub cpu_cores: [u8; 8],
22504    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22505    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22506    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22507    pub cpu_combined: [u8; 10],
22508    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22509    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22510    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22511    pub gpu_cores: [u8; 4],
22512    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22513    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22514    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22515    pub gpu_combined: [u8; 10],
22516    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
22517    pub temperature_board: i8,
22518    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
22519    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22520    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22521    pub temperature_core: [i8; 8],
22522}
22523impl ONBOARD_COMPUTER_STATUS_DATA {
22524    pub const ENCODED_LEN: usize = 238usize;
22525    pub const DEFAULT: Self = Self {
22526        time_usec: 0_u64,
22527        uptime: 0_u32,
22528        ram_usage: 0_u32,
22529        ram_total: 0_u32,
22530        storage_type: [0_u32; 4usize],
22531        storage_usage: [0_u32; 4usize],
22532        storage_total: [0_u32; 4usize],
22533        link_type: [0_u32; 6usize],
22534        link_tx_rate: [0_u32; 6usize],
22535        link_rx_rate: [0_u32; 6usize],
22536        link_tx_max: [0_u32; 6usize],
22537        link_rx_max: [0_u32; 6usize],
22538        fan_speed: [0_i16; 4usize],
22539        mavtype: 0_u8,
22540        cpu_cores: [0_u8; 8usize],
22541        cpu_combined: [0_u8; 10usize],
22542        gpu_cores: [0_u8; 4usize],
22543        gpu_combined: [0_u8; 10usize],
22544        temperature_board: 0_i8,
22545        temperature_core: [0_i8; 8usize],
22546    };
22547    #[cfg(feature = "arbitrary")]
22548    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22549        use arbitrary::{Arbitrary, Unstructured};
22550        let mut buf = [0u8; 1024];
22551        rng.fill_bytes(&mut buf);
22552        let mut unstructured = Unstructured::new(&buf);
22553        Self::arbitrary(&mut unstructured).unwrap_or_default()
22554    }
22555}
22556impl Default for ONBOARD_COMPUTER_STATUS_DATA {
22557    fn default() -> Self {
22558        Self::DEFAULT.clone()
22559    }
22560}
22561impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
22562    type Message = MavMessage;
22563    const ID: u32 = 390u32;
22564    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
22565    const EXTRA_CRC: u8 = 156u8;
22566    const ENCODED_LEN: usize = 238usize;
22567    fn deser(
22568        _version: MavlinkVersion,
22569        __input: &[u8],
22570    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22571        let avail_len = __input.len();
22572        let mut payload_buf = [0; Self::ENCODED_LEN];
22573        let mut buf = if avail_len < Self::ENCODED_LEN {
22574            payload_buf[0..avail_len].copy_from_slice(__input);
22575            Bytes::new(&payload_buf)
22576        } else {
22577            Bytes::new(__input)
22578        };
22579        let mut __struct = Self::default();
22580        __struct.time_usec = buf.get_u64_le();
22581        __struct.uptime = buf.get_u32_le();
22582        __struct.ram_usage = buf.get_u32_le();
22583        __struct.ram_total = buf.get_u32_le();
22584        for v in &mut __struct.storage_type {
22585            let val = buf.get_u32_le();
22586            *v = val;
22587        }
22588        for v in &mut __struct.storage_usage {
22589            let val = buf.get_u32_le();
22590            *v = val;
22591        }
22592        for v in &mut __struct.storage_total {
22593            let val = buf.get_u32_le();
22594            *v = val;
22595        }
22596        for v in &mut __struct.link_type {
22597            let val = buf.get_u32_le();
22598            *v = val;
22599        }
22600        for v in &mut __struct.link_tx_rate {
22601            let val = buf.get_u32_le();
22602            *v = val;
22603        }
22604        for v in &mut __struct.link_rx_rate {
22605            let val = buf.get_u32_le();
22606            *v = val;
22607        }
22608        for v in &mut __struct.link_tx_max {
22609            let val = buf.get_u32_le();
22610            *v = val;
22611        }
22612        for v in &mut __struct.link_rx_max {
22613            let val = buf.get_u32_le();
22614            *v = val;
22615        }
22616        for v in &mut __struct.fan_speed {
22617            let val = buf.get_i16_le();
22618            *v = val;
22619        }
22620        __struct.mavtype = buf.get_u8();
22621        for v in &mut __struct.cpu_cores {
22622            let val = buf.get_u8();
22623            *v = val;
22624        }
22625        for v in &mut __struct.cpu_combined {
22626            let val = buf.get_u8();
22627            *v = val;
22628        }
22629        for v in &mut __struct.gpu_cores {
22630            let val = buf.get_u8();
22631            *v = val;
22632        }
22633        for v in &mut __struct.gpu_combined {
22634            let val = buf.get_u8();
22635            *v = val;
22636        }
22637        __struct.temperature_board = buf.get_i8();
22638        for v in &mut __struct.temperature_core {
22639            let val = buf.get_i8();
22640            *v = val;
22641        }
22642        Ok(__struct)
22643    }
22644    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22645        let mut __tmp = BytesMut::new(bytes);
22646        #[allow(clippy::absurd_extreme_comparisons)]
22647        #[allow(unused_comparisons)]
22648        if __tmp.remaining() < Self::ENCODED_LEN {
22649            panic!(
22650                "buffer is too small (need {} bytes, but got {})",
22651                Self::ENCODED_LEN,
22652                __tmp.remaining(),
22653            )
22654        }
22655        __tmp.put_u64_le(self.time_usec);
22656        __tmp.put_u32_le(self.uptime);
22657        __tmp.put_u32_le(self.ram_usage);
22658        __tmp.put_u32_le(self.ram_total);
22659        for val in &self.storage_type {
22660            __tmp.put_u32_le(*val);
22661        }
22662        for val in &self.storage_usage {
22663            __tmp.put_u32_le(*val);
22664        }
22665        for val in &self.storage_total {
22666            __tmp.put_u32_le(*val);
22667        }
22668        for val in &self.link_type {
22669            __tmp.put_u32_le(*val);
22670        }
22671        for val in &self.link_tx_rate {
22672            __tmp.put_u32_le(*val);
22673        }
22674        for val in &self.link_rx_rate {
22675            __tmp.put_u32_le(*val);
22676        }
22677        for val in &self.link_tx_max {
22678            __tmp.put_u32_le(*val);
22679        }
22680        for val in &self.link_rx_max {
22681            __tmp.put_u32_le(*val);
22682        }
22683        for val in &self.fan_speed {
22684            __tmp.put_i16_le(*val);
22685        }
22686        __tmp.put_u8(self.mavtype);
22687        for val in &self.cpu_cores {
22688            __tmp.put_u8(*val);
22689        }
22690        for val in &self.cpu_combined {
22691            __tmp.put_u8(*val);
22692        }
22693        for val in &self.gpu_cores {
22694            __tmp.put_u8(*val);
22695        }
22696        for val in &self.gpu_combined {
22697            __tmp.put_u8(*val);
22698        }
22699        __tmp.put_i8(self.temperature_board);
22700        for val in &self.temperature_core {
22701            __tmp.put_i8(*val);
22702        }
22703        if matches!(version, MavlinkVersion::V2) {
22704            let len = __tmp.len();
22705            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22706        } else {
22707            __tmp.len()
22708        }
22709    }
22710}
22711#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
22712#[doc = ""]
22713#[doc = "ID: 12918"]
22714#[derive(Debug, Clone, PartialEq)]
22715#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22716#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22717#[cfg_attr(feature = "ts", derive(TS))]
22718#[cfg_attr(feature = "ts", ts(export))]
22719pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
22720    #[doc = "Status level indicating if arming is allowed."]
22721    pub status: MavOdidArmStatus,
22722    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
22723    #[cfg_attr(feature = "ts", ts(type = "string"))]
22724    pub error: CharArray<50>,
22725}
22726impl OPEN_DRONE_ID_ARM_STATUS_DATA {
22727    pub const ENCODED_LEN: usize = 51usize;
22728    pub const DEFAULT: Self = Self {
22729        status: MavOdidArmStatus::DEFAULT,
22730        error: CharArray::new([0_u8; 50usize]),
22731    };
22732    #[cfg(feature = "arbitrary")]
22733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22734        use arbitrary::{Arbitrary, Unstructured};
22735        let mut buf = [0u8; 1024];
22736        rng.fill_bytes(&mut buf);
22737        let mut unstructured = Unstructured::new(&buf);
22738        Self::arbitrary(&mut unstructured).unwrap_or_default()
22739    }
22740}
22741impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
22742    fn default() -> Self {
22743        Self::DEFAULT.clone()
22744    }
22745}
22746impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
22747    type Message = MavMessage;
22748    const ID: u32 = 12918u32;
22749    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
22750    const EXTRA_CRC: u8 = 139u8;
22751    const ENCODED_LEN: usize = 51usize;
22752    fn deser(
22753        _version: MavlinkVersion,
22754        __input: &[u8],
22755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22756        let avail_len = __input.len();
22757        let mut payload_buf = [0; Self::ENCODED_LEN];
22758        let mut buf = if avail_len < Self::ENCODED_LEN {
22759            payload_buf[0..avail_len].copy_from_slice(__input);
22760            Bytes::new(&payload_buf)
22761        } else {
22762            Bytes::new(__input)
22763        };
22764        let mut __struct = Self::default();
22765        let tmp = buf.get_u8();
22766        __struct.status =
22767            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22768                enum_type: "MavOdidArmStatus",
22769                value: tmp as u64,
22770            })?;
22771        let mut tmp = [0_u8; 50usize];
22772        for v in &mut tmp {
22773            *v = buf.get_u8();
22774        }
22775        __struct.error = CharArray::new(tmp);
22776        Ok(__struct)
22777    }
22778    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22779        let mut __tmp = BytesMut::new(bytes);
22780        #[allow(clippy::absurd_extreme_comparisons)]
22781        #[allow(unused_comparisons)]
22782        if __tmp.remaining() < Self::ENCODED_LEN {
22783            panic!(
22784                "buffer is too small (need {} bytes, but got {})",
22785                Self::ENCODED_LEN,
22786                __tmp.remaining(),
22787            )
22788        }
22789        __tmp.put_u8(self.status as u8);
22790        for val in &self.error {
22791            __tmp.put_u8(*val);
22792        }
22793        if matches!(version, MavlinkVersion::V2) {
22794            let len = __tmp.len();
22795            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22796        } else {
22797            __tmp.len()
22798        }
22799    }
22800}
22801#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
22802#[doc = ""]
22803#[doc = "ID: 12902"]
22804#[derive(Debug, Clone, PartialEq)]
22805#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22806#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22807#[cfg_attr(feature = "ts", derive(TS))]
22808#[cfg_attr(feature = "ts", ts(export))]
22809pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
22810    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22811    pub timestamp: u32,
22812    #[doc = "System ID (0 for broadcast)."]
22813    pub target_system: u8,
22814    #[doc = "Component ID (0 for broadcast)."]
22815    pub target_component: u8,
22816    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22817    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22818    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22819    pub id_or_mac: [u8; 20],
22820    #[doc = "Indicates the type of authentication."]
22821    pub authentication_type: MavOdidAuthType,
22822    #[doc = "Allowed range is 0 - 15."]
22823    pub data_page: u8,
22824    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22825    pub last_page_index: u8,
22826    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22827    pub length: u8,
22828    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
22829    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22830    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22831    pub authentication_data: [u8; 23],
22832}
22833impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
22834    pub const ENCODED_LEN: usize = 53usize;
22835    pub const DEFAULT: Self = Self {
22836        timestamp: 0_u32,
22837        target_system: 0_u8,
22838        target_component: 0_u8,
22839        id_or_mac: [0_u8; 20usize],
22840        authentication_type: MavOdidAuthType::DEFAULT,
22841        data_page: 0_u8,
22842        last_page_index: 0_u8,
22843        length: 0_u8,
22844        authentication_data: [0_u8; 23usize],
22845    };
22846    #[cfg(feature = "arbitrary")]
22847    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22848        use arbitrary::{Arbitrary, Unstructured};
22849        let mut buf = [0u8; 1024];
22850        rng.fill_bytes(&mut buf);
22851        let mut unstructured = Unstructured::new(&buf);
22852        Self::arbitrary(&mut unstructured).unwrap_or_default()
22853    }
22854}
22855impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22856    fn default() -> Self {
22857        Self::DEFAULT.clone()
22858    }
22859}
22860impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22861    type Message = MavMessage;
22862    const ID: u32 = 12902u32;
22863    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
22864    const EXTRA_CRC: u8 = 140u8;
22865    const ENCODED_LEN: usize = 53usize;
22866    fn deser(
22867        _version: MavlinkVersion,
22868        __input: &[u8],
22869    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22870        let avail_len = __input.len();
22871        let mut payload_buf = [0; Self::ENCODED_LEN];
22872        let mut buf = if avail_len < Self::ENCODED_LEN {
22873            payload_buf[0..avail_len].copy_from_slice(__input);
22874            Bytes::new(&payload_buf)
22875        } else {
22876            Bytes::new(__input)
22877        };
22878        let mut __struct = Self::default();
22879        __struct.timestamp = buf.get_u32_le();
22880        __struct.target_system = buf.get_u8();
22881        __struct.target_component = buf.get_u8();
22882        for v in &mut __struct.id_or_mac {
22883            let val = buf.get_u8();
22884            *v = val;
22885        }
22886        let tmp = buf.get_u8();
22887        __struct.authentication_type =
22888            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22889                enum_type: "MavOdidAuthType",
22890                value: tmp as u64,
22891            })?;
22892        __struct.data_page = buf.get_u8();
22893        __struct.last_page_index = buf.get_u8();
22894        __struct.length = buf.get_u8();
22895        for v in &mut __struct.authentication_data {
22896            let val = buf.get_u8();
22897            *v = val;
22898        }
22899        Ok(__struct)
22900    }
22901    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22902        let mut __tmp = BytesMut::new(bytes);
22903        #[allow(clippy::absurd_extreme_comparisons)]
22904        #[allow(unused_comparisons)]
22905        if __tmp.remaining() < Self::ENCODED_LEN {
22906            panic!(
22907                "buffer is too small (need {} bytes, but got {})",
22908                Self::ENCODED_LEN,
22909                __tmp.remaining(),
22910            )
22911        }
22912        __tmp.put_u32_le(self.timestamp);
22913        __tmp.put_u8(self.target_system);
22914        __tmp.put_u8(self.target_component);
22915        for val in &self.id_or_mac {
22916            __tmp.put_u8(*val);
22917        }
22918        __tmp.put_u8(self.authentication_type as u8);
22919        __tmp.put_u8(self.data_page);
22920        __tmp.put_u8(self.last_page_index);
22921        __tmp.put_u8(self.length);
22922        for val in &self.authentication_data {
22923            __tmp.put_u8(*val);
22924        }
22925        if matches!(version, MavlinkVersion::V2) {
22926            let len = __tmp.len();
22927            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22928        } else {
22929            __tmp.len()
22930        }
22931    }
22932}
22933#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
22934#[doc = ""]
22935#[doc = "ID: 12900"]
22936#[derive(Debug, Clone, PartialEq)]
22937#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22938#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22939#[cfg_attr(feature = "ts", derive(TS))]
22940#[cfg_attr(feature = "ts", ts(export))]
22941pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
22942    #[doc = "System ID (0 for broadcast)."]
22943    pub target_system: u8,
22944    #[doc = "Component ID (0 for broadcast)."]
22945    pub target_component: u8,
22946    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22947    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22948    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22949    pub id_or_mac: [u8; 20],
22950    #[doc = "Indicates the format for the uas_id field of this message."]
22951    pub id_type: MavOdidIdType,
22952    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
22953    pub ua_type: MavOdidUaType,
22954    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
22955    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22956    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22957    pub uas_id: [u8; 20],
22958}
22959impl OPEN_DRONE_ID_BASIC_ID_DATA {
22960    pub const ENCODED_LEN: usize = 44usize;
22961    pub const DEFAULT: Self = Self {
22962        target_system: 0_u8,
22963        target_component: 0_u8,
22964        id_or_mac: [0_u8; 20usize],
22965        id_type: MavOdidIdType::DEFAULT,
22966        ua_type: MavOdidUaType::DEFAULT,
22967        uas_id: [0_u8; 20usize],
22968    };
22969    #[cfg(feature = "arbitrary")]
22970    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22971        use arbitrary::{Arbitrary, Unstructured};
22972        let mut buf = [0u8; 1024];
22973        rng.fill_bytes(&mut buf);
22974        let mut unstructured = Unstructured::new(&buf);
22975        Self::arbitrary(&mut unstructured).unwrap_or_default()
22976    }
22977}
22978impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
22979    fn default() -> Self {
22980        Self::DEFAULT.clone()
22981    }
22982}
22983impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
22984    type Message = MavMessage;
22985    const ID: u32 = 12900u32;
22986    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
22987    const EXTRA_CRC: u8 = 114u8;
22988    const ENCODED_LEN: usize = 44usize;
22989    fn deser(
22990        _version: MavlinkVersion,
22991        __input: &[u8],
22992    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22993        let avail_len = __input.len();
22994        let mut payload_buf = [0; Self::ENCODED_LEN];
22995        let mut buf = if avail_len < Self::ENCODED_LEN {
22996            payload_buf[0..avail_len].copy_from_slice(__input);
22997            Bytes::new(&payload_buf)
22998        } else {
22999            Bytes::new(__input)
23000        };
23001        let mut __struct = Self::default();
23002        __struct.target_system = buf.get_u8();
23003        __struct.target_component = buf.get_u8();
23004        for v in &mut __struct.id_or_mac {
23005            let val = buf.get_u8();
23006            *v = val;
23007        }
23008        let tmp = buf.get_u8();
23009        __struct.id_type =
23010            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23011                enum_type: "MavOdidIdType",
23012                value: tmp as u64,
23013            })?;
23014        let tmp = buf.get_u8();
23015        __struct.ua_type =
23016            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23017                enum_type: "MavOdidUaType",
23018                value: tmp as u64,
23019            })?;
23020        for v in &mut __struct.uas_id {
23021            let val = buf.get_u8();
23022            *v = val;
23023        }
23024        Ok(__struct)
23025    }
23026    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23027        let mut __tmp = BytesMut::new(bytes);
23028        #[allow(clippy::absurd_extreme_comparisons)]
23029        #[allow(unused_comparisons)]
23030        if __tmp.remaining() < Self::ENCODED_LEN {
23031            panic!(
23032                "buffer is too small (need {} bytes, but got {})",
23033                Self::ENCODED_LEN,
23034                __tmp.remaining(),
23035            )
23036        }
23037        __tmp.put_u8(self.target_system);
23038        __tmp.put_u8(self.target_component);
23039        for val in &self.id_or_mac {
23040            __tmp.put_u8(*val);
23041        }
23042        __tmp.put_u8(self.id_type as u8);
23043        __tmp.put_u8(self.ua_type as u8);
23044        for val in &self.uas_id {
23045            __tmp.put_u8(*val);
23046        }
23047        if matches!(version, MavlinkVersion::V2) {
23048            let len = __tmp.len();
23049            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23050        } else {
23051            __tmp.len()
23052        }
23053    }
23054}
23055#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
23056#[doc = ""]
23057#[doc = "ID: 12901"]
23058#[derive(Debug, Clone, PartialEq)]
23059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23061#[cfg_attr(feature = "ts", derive(TS))]
23062#[cfg_attr(feature = "ts", ts(export))]
23063pub struct OPEN_DRONE_ID_LOCATION_DATA {
23064    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
23065    pub latitude: i32,
23066    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
23067    pub longitude: i32,
23068    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
23069    pub altitude_barometric: f32,
23070    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
23071    pub altitude_geodetic: f32,
23072    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
23073    pub height: f32,
23074    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
23075    pub timestamp: f32,
23076    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
23077    pub direction: u16,
23078    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
23079    pub speed_horizontal: u16,
23080    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
23081    pub speed_vertical: i16,
23082    #[doc = "System ID (0 for broadcast)."]
23083    pub target_system: u8,
23084    #[doc = "Component ID (0 for broadcast)."]
23085    pub target_component: u8,
23086    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23087    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23088    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23089    pub id_or_mac: [u8; 20],
23090    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
23091    pub status: MavOdidStatus,
23092    #[doc = "Indicates the reference point for the height field."]
23093    pub height_reference: MavOdidHeightRef,
23094    #[doc = "The accuracy of the horizontal position."]
23095    pub horizontal_accuracy: MavOdidHorAcc,
23096    #[doc = "The accuracy of the vertical position."]
23097    pub vertical_accuracy: MavOdidVerAcc,
23098    #[doc = "The accuracy of the barometric altitude."]
23099    pub barometer_accuracy: MavOdidVerAcc,
23100    #[doc = "The accuracy of the horizontal and vertical speed."]
23101    pub speed_accuracy: MavOdidSpeedAcc,
23102    #[doc = "The accuracy of the timestamps."]
23103    pub timestamp_accuracy: MavOdidTimeAcc,
23104}
23105impl OPEN_DRONE_ID_LOCATION_DATA {
23106    pub const ENCODED_LEN: usize = 59usize;
23107    pub const DEFAULT: Self = Self {
23108        latitude: 0_i32,
23109        longitude: 0_i32,
23110        altitude_barometric: 0.0_f32,
23111        altitude_geodetic: 0.0_f32,
23112        height: 0.0_f32,
23113        timestamp: 0.0_f32,
23114        direction: 0_u16,
23115        speed_horizontal: 0_u16,
23116        speed_vertical: 0_i16,
23117        target_system: 0_u8,
23118        target_component: 0_u8,
23119        id_or_mac: [0_u8; 20usize],
23120        status: MavOdidStatus::DEFAULT,
23121        height_reference: MavOdidHeightRef::DEFAULT,
23122        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
23123        vertical_accuracy: MavOdidVerAcc::DEFAULT,
23124        barometer_accuracy: MavOdidVerAcc::DEFAULT,
23125        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
23126        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
23127    };
23128    #[cfg(feature = "arbitrary")]
23129    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23130        use arbitrary::{Arbitrary, Unstructured};
23131        let mut buf = [0u8; 1024];
23132        rng.fill_bytes(&mut buf);
23133        let mut unstructured = Unstructured::new(&buf);
23134        Self::arbitrary(&mut unstructured).unwrap_or_default()
23135    }
23136}
23137impl Default for OPEN_DRONE_ID_LOCATION_DATA {
23138    fn default() -> Self {
23139        Self::DEFAULT.clone()
23140    }
23141}
23142impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
23143    type Message = MavMessage;
23144    const ID: u32 = 12901u32;
23145    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
23146    const EXTRA_CRC: u8 = 254u8;
23147    const ENCODED_LEN: usize = 59usize;
23148    fn deser(
23149        _version: MavlinkVersion,
23150        __input: &[u8],
23151    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23152        let avail_len = __input.len();
23153        let mut payload_buf = [0; Self::ENCODED_LEN];
23154        let mut buf = if avail_len < Self::ENCODED_LEN {
23155            payload_buf[0..avail_len].copy_from_slice(__input);
23156            Bytes::new(&payload_buf)
23157        } else {
23158            Bytes::new(__input)
23159        };
23160        let mut __struct = Self::default();
23161        __struct.latitude = buf.get_i32_le();
23162        __struct.longitude = buf.get_i32_le();
23163        __struct.altitude_barometric = buf.get_f32_le();
23164        __struct.altitude_geodetic = buf.get_f32_le();
23165        __struct.height = buf.get_f32_le();
23166        __struct.timestamp = buf.get_f32_le();
23167        __struct.direction = buf.get_u16_le();
23168        __struct.speed_horizontal = buf.get_u16_le();
23169        __struct.speed_vertical = buf.get_i16_le();
23170        __struct.target_system = buf.get_u8();
23171        __struct.target_component = buf.get_u8();
23172        for v in &mut __struct.id_or_mac {
23173            let val = buf.get_u8();
23174            *v = val;
23175        }
23176        let tmp = buf.get_u8();
23177        __struct.status =
23178            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23179                enum_type: "MavOdidStatus",
23180                value: tmp as u64,
23181            })?;
23182        let tmp = buf.get_u8();
23183        __struct.height_reference =
23184            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23185                enum_type: "MavOdidHeightRef",
23186                value: tmp as u64,
23187            })?;
23188        let tmp = buf.get_u8();
23189        __struct.horizontal_accuracy =
23190            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23191                enum_type: "MavOdidHorAcc",
23192                value: tmp as u64,
23193            })?;
23194        let tmp = buf.get_u8();
23195        __struct.vertical_accuracy =
23196            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23197                enum_type: "MavOdidVerAcc",
23198                value: tmp as u64,
23199            })?;
23200        let tmp = buf.get_u8();
23201        __struct.barometer_accuracy =
23202            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23203                enum_type: "MavOdidVerAcc",
23204                value: tmp as u64,
23205            })?;
23206        let tmp = buf.get_u8();
23207        __struct.speed_accuracy =
23208            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23209                enum_type: "MavOdidSpeedAcc",
23210                value: tmp as u64,
23211            })?;
23212        let tmp = buf.get_u8();
23213        __struct.timestamp_accuracy =
23214            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23215                enum_type: "MavOdidTimeAcc",
23216                value: tmp as u64,
23217            })?;
23218        Ok(__struct)
23219    }
23220    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23221        let mut __tmp = BytesMut::new(bytes);
23222        #[allow(clippy::absurd_extreme_comparisons)]
23223        #[allow(unused_comparisons)]
23224        if __tmp.remaining() < Self::ENCODED_LEN {
23225            panic!(
23226                "buffer is too small (need {} bytes, but got {})",
23227                Self::ENCODED_LEN,
23228                __tmp.remaining(),
23229            )
23230        }
23231        __tmp.put_i32_le(self.latitude);
23232        __tmp.put_i32_le(self.longitude);
23233        __tmp.put_f32_le(self.altitude_barometric);
23234        __tmp.put_f32_le(self.altitude_geodetic);
23235        __tmp.put_f32_le(self.height);
23236        __tmp.put_f32_le(self.timestamp);
23237        __tmp.put_u16_le(self.direction);
23238        __tmp.put_u16_le(self.speed_horizontal);
23239        __tmp.put_i16_le(self.speed_vertical);
23240        __tmp.put_u8(self.target_system);
23241        __tmp.put_u8(self.target_component);
23242        for val in &self.id_or_mac {
23243            __tmp.put_u8(*val);
23244        }
23245        __tmp.put_u8(self.status as u8);
23246        __tmp.put_u8(self.height_reference as u8);
23247        __tmp.put_u8(self.horizontal_accuracy as u8);
23248        __tmp.put_u8(self.vertical_accuracy as u8);
23249        __tmp.put_u8(self.barometer_accuracy as u8);
23250        __tmp.put_u8(self.speed_accuracy as u8);
23251        __tmp.put_u8(self.timestamp_accuracy as u8);
23252        if matches!(version, MavlinkVersion::V2) {
23253            let len = __tmp.len();
23254            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23255        } else {
23256            __tmp.len()
23257        }
23258    }
23259}
23260#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
23261#[doc = ""]
23262#[doc = "ID: 12915"]
23263#[derive(Debug, Clone, PartialEq)]
23264#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23265#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23266#[cfg_attr(feature = "ts", derive(TS))]
23267#[cfg_attr(feature = "ts", ts(export))]
23268pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23269    #[doc = "System ID (0 for broadcast)."]
23270    pub target_system: u8,
23271    #[doc = "Component ID (0 for broadcast)."]
23272    pub target_component: u8,
23273    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23274    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23275    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23276    pub id_or_mac: [u8; 20],
23277    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
23278    pub single_message_size: u8,
23279    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
23280    pub msg_pack_size: u8,
23281    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
23282    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23283    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23284    pub messages: [u8; 225],
23285}
23286impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23287    pub const ENCODED_LEN: usize = 249usize;
23288    pub const DEFAULT: Self = Self {
23289        target_system: 0_u8,
23290        target_component: 0_u8,
23291        id_or_mac: [0_u8; 20usize],
23292        single_message_size: 0_u8,
23293        msg_pack_size: 0_u8,
23294        messages: [0_u8; 225usize],
23295    };
23296    #[cfg(feature = "arbitrary")]
23297    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23298        use arbitrary::{Arbitrary, Unstructured};
23299        let mut buf = [0u8; 1024];
23300        rng.fill_bytes(&mut buf);
23301        let mut unstructured = Unstructured::new(&buf);
23302        Self::arbitrary(&mut unstructured).unwrap_or_default()
23303    }
23304}
23305impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23306    fn default() -> Self {
23307        Self::DEFAULT.clone()
23308    }
23309}
23310impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23311    type Message = MavMessage;
23312    const ID: u32 = 12915u32;
23313    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
23314    const EXTRA_CRC: u8 = 94u8;
23315    const ENCODED_LEN: usize = 249usize;
23316    fn deser(
23317        _version: MavlinkVersion,
23318        __input: &[u8],
23319    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23320        let avail_len = __input.len();
23321        let mut payload_buf = [0; Self::ENCODED_LEN];
23322        let mut buf = if avail_len < Self::ENCODED_LEN {
23323            payload_buf[0..avail_len].copy_from_slice(__input);
23324            Bytes::new(&payload_buf)
23325        } else {
23326            Bytes::new(__input)
23327        };
23328        let mut __struct = Self::default();
23329        __struct.target_system = buf.get_u8();
23330        __struct.target_component = buf.get_u8();
23331        for v in &mut __struct.id_or_mac {
23332            let val = buf.get_u8();
23333            *v = val;
23334        }
23335        __struct.single_message_size = buf.get_u8();
23336        __struct.msg_pack_size = buf.get_u8();
23337        for v in &mut __struct.messages {
23338            let val = buf.get_u8();
23339            *v = val;
23340        }
23341        Ok(__struct)
23342    }
23343    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23344        let mut __tmp = BytesMut::new(bytes);
23345        #[allow(clippy::absurd_extreme_comparisons)]
23346        #[allow(unused_comparisons)]
23347        if __tmp.remaining() < Self::ENCODED_LEN {
23348            panic!(
23349                "buffer is too small (need {} bytes, but got {})",
23350                Self::ENCODED_LEN,
23351                __tmp.remaining(),
23352            )
23353        }
23354        __tmp.put_u8(self.target_system);
23355        __tmp.put_u8(self.target_component);
23356        for val in &self.id_or_mac {
23357            __tmp.put_u8(*val);
23358        }
23359        __tmp.put_u8(self.single_message_size);
23360        __tmp.put_u8(self.msg_pack_size);
23361        for val in &self.messages {
23362            __tmp.put_u8(*val);
23363        }
23364        if matches!(version, MavlinkVersion::V2) {
23365            let len = __tmp.len();
23366            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23367        } else {
23368            __tmp.len()
23369        }
23370    }
23371}
23372#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
23373#[doc = ""]
23374#[doc = "ID: 12905"]
23375#[derive(Debug, Clone, PartialEq)]
23376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23378#[cfg_attr(feature = "ts", derive(TS))]
23379#[cfg_attr(feature = "ts", ts(export))]
23380pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
23381    #[doc = "System ID (0 for broadcast)."]
23382    pub target_system: u8,
23383    #[doc = "Component ID (0 for broadcast)."]
23384    pub target_component: u8,
23385    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23386    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23387    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23388    pub id_or_mac: [u8; 20],
23389    #[doc = "Indicates the type of the operator_id field."]
23390    pub operator_id_type: MavOdidOperatorIdType,
23391    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23392    #[cfg_attr(feature = "ts", ts(type = "string"))]
23393    pub operator_id: CharArray<20>,
23394}
23395impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
23396    pub const ENCODED_LEN: usize = 43usize;
23397    pub const DEFAULT: Self = Self {
23398        target_system: 0_u8,
23399        target_component: 0_u8,
23400        id_or_mac: [0_u8; 20usize],
23401        operator_id_type: MavOdidOperatorIdType::DEFAULT,
23402        operator_id: CharArray::new([0_u8; 20usize]),
23403    };
23404    #[cfg(feature = "arbitrary")]
23405    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23406        use arbitrary::{Arbitrary, Unstructured};
23407        let mut buf = [0u8; 1024];
23408        rng.fill_bytes(&mut buf);
23409        let mut unstructured = Unstructured::new(&buf);
23410        Self::arbitrary(&mut unstructured).unwrap_or_default()
23411    }
23412}
23413impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23414    fn default() -> Self {
23415        Self::DEFAULT.clone()
23416    }
23417}
23418impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23419    type Message = MavMessage;
23420    const ID: u32 = 12905u32;
23421    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
23422    const EXTRA_CRC: u8 = 49u8;
23423    const ENCODED_LEN: usize = 43usize;
23424    fn deser(
23425        _version: MavlinkVersion,
23426        __input: &[u8],
23427    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23428        let avail_len = __input.len();
23429        let mut payload_buf = [0; Self::ENCODED_LEN];
23430        let mut buf = if avail_len < Self::ENCODED_LEN {
23431            payload_buf[0..avail_len].copy_from_slice(__input);
23432            Bytes::new(&payload_buf)
23433        } else {
23434            Bytes::new(__input)
23435        };
23436        let mut __struct = Self::default();
23437        __struct.target_system = buf.get_u8();
23438        __struct.target_component = buf.get_u8();
23439        for v in &mut __struct.id_or_mac {
23440            let val = buf.get_u8();
23441            *v = val;
23442        }
23443        let tmp = buf.get_u8();
23444        __struct.operator_id_type =
23445            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23446                enum_type: "MavOdidOperatorIdType",
23447                value: tmp as u64,
23448            })?;
23449        let mut tmp = [0_u8; 20usize];
23450        for v in &mut tmp {
23451            *v = buf.get_u8();
23452        }
23453        __struct.operator_id = CharArray::new(tmp);
23454        Ok(__struct)
23455    }
23456    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23457        let mut __tmp = BytesMut::new(bytes);
23458        #[allow(clippy::absurd_extreme_comparisons)]
23459        #[allow(unused_comparisons)]
23460        if __tmp.remaining() < Self::ENCODED_LEN {
23461            panic!(
23462                "buffer is too small (need {} bytes, but got {})",
23463                Self::ENCODED_LEN,
23464                __tmp.remaining(),
23465            )
23466        }
23467        __tmp.put_u8(self.target_system);
23468        __tmp.put_u8(self.target_component);
23469        for val in &self.id_or_mac {
23470            __tmp.put_u8(*val);
23471        }
23472        __tmp.put_u8(self.operator_id_type as u8);
23473        for val in &self.operator_id {
23474            __tmp.put_u8(*val);
23475        }
23476        if matches!(version, MavlinkVersion::V2) {
23477            let len = __tmp.len();
23478            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23479        } else {
23480            __tmp.len()
23481        }
23482    }
23483}
23484#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
23485#[doc = ""]
23486#[doc = "ID: 12903"]
23487#[derive(Debug, Clone, PartialEq)]
23488#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23489#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23490#[cfg_attr(feature = "ts", derive(TS))]
23491#[cfg_attr(feature = "ts", ts(export))]
23492pub struct OPEN_DRONE_ID_SELF_ID_DATA {
23493    #[doc = "System ID (0 for broadcast)."]
23494    pub target_system: u8,
23495    #[doc = "Component ID (0 for broadcast)."]
23496    pub target_component: u8,
23497    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23498    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23499    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23500    pub id_or_mac: [u8; 20],
23501    #[doc = "Indicates the type of the description field."]
23502    pub description_type: MavOdidDescType,
23503    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23504    #[cfg_attr(feature = "ts", ts(type = "string"))]
23505    pub description: CharArray<23>,
23506}
23507impl OPEN_DRONE_ID_SELF_ID_DATA {
23508    pub const ENCODED_LEN: usize = 46usize;
23509    pub const DEFAULT: Self = Self {
23510        target_system: 0_u8,
23511        target_component: 0_u8,
23512        id_or_mac: [0_u8; 20usize],
23513        description_type: MavOdidDescType::DEFAULT,
23514        description: CharArray::new([0_u8; 23usize]),
23515    };
23516    #[cfg(feature = "arbitrary")]
23517    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23518        use arbitrary::{Arbitrary, Unstructured};
23519        let mut buf = [0u8; 1024];
23520        rng.fill_bytes(&mut buf);
23521        let mut unstructured = Unstructured::new(&buf);
23522        Self::arbitrary(&mut unstructured).unwrap_or_default()
23523    }
23524}
23525impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
23526    fn default() -> Self {
23527        Self::DEFAULT.clone()
23528    }
23529}
23530impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
23531    type Message = MavMessage;
23532    const ID: u32 = 12903u32;
23533    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
23534    const EXTRA_CRC: u8 = 249u8;
23535    const ENCODED_LEN: usize = 46usize;
23536    fn deser(
23537        _version: MavlinkVersion,
23538        __input: &[u8],
23539    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23540        let avail_len = __input.len();
23541        let mut payload_buf = [0; Self::ENCODED_LEN];
23542        let mut buf = if avail_len < Self::ENCODED_LEN {
23543            payload_buf[0..avail_len].copy_from_slice(__input);
23544            Bytes::new(&payload_buf)
23545        } else {
23546            Bytes::new(__input)
23547        };
23548        let mut __struct = Self::default();
23549        __struct.target_system = buf.get_u8();
23550        __struct.target_component = buf.get_u8();
23551        for v in &mut __struct.id_or_mac {
23552            let val = buf.get_u8();
23553            *v = val;
23554        }
23555        let tmp = buf.get_u8();
23556        __struct.description_type =
23557            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23558                enum_type: "MavOdidDescType",
23559                value: tmp as u64,
23560            })?;
23561        let mut tmp = [0_u8; 23usize];
23562        for v in &mut tmp {
23563            *v = buf.get_u8();
23564        }
23565        __struct.description = CharArray::new(tmp);
23566        Ok(__struct)
23567    }
23568    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23569        let mut __tmp = BytesMut::new(bytes);
23570        #[allow(clippy::absurd_extreme_comparisons)]
23571        #[allow(unused_comparisons)]
23572        if __tmp.remaining() < Self::ENCODED_LEN {
23573            panic!(
23574                "buffer is too small (need {} bytes, but got {})",
23575                Self::ENCODED_LEN,
23576                __tmp.remaining(),
23577            )
23578        }
23579        __tmp.put_u8(self.target_system);
23580        __tmp.put_u8(self.target_component);
23581        for val in &self.id_or_mac {
23582            __tmp.put_u8(*val);
23583        }
23584        __tmp.put_u8(self.description_type as u8);
23585        for val in &self.description {
23586            __tmp.put_u8(*val);
23587        }
23588        if matches!(version, MavlinkVersion::V2) {
23589            let len = __tmp.len();
23590            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23591        } else {
23592            __tmp.len()
23593        }
23594    }
23595}
23596#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
23597#[doc = ""]
23598#[doc = "ID: 12904"]
23599#[derive(Debug, Clone, PartialEq)]
23600#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23601#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23602#[cfg_attr(feature = "ts", derive(TS))]
23603#[cfg_attr(feature = "ts", ts(export))]
23604pub struct OPEN_DRONE_ID_SYSTEM_DATA {
23605    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23606    pub operator_latitude: i32,
23607    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23608    pub operator_longitude: i32,
23609    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23610    pub area_ceiling: f32,
23611    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23612    pub area_floor: f32,
23613    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23614    pub operator_altitude_geo: f32,
23615    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23616    pub timestamp: u32,
23617    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
23618    pub area_count: u16,
23619    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
23620    pub area_radius: u16,
23621    #[doc = "System ID (0 for broadcast)."]
23622    pub target_system: u8,
23623    #[doc = "Component ID (0 for broadcast)."]
23624    pub target_component: u8,
23625    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23626    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23627    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23628    pub id_or_mac: [u8; 20],
23629    #[doc = "Specifies the operator location type."]
23630    pub operator_location_type: MavOdidOperatorLocationType,
23631    #[doc = "Specifies the classification type of the UA."]
23632    pub classification_type: MavOdidClassificationType,
23633    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
23634    pub category_eu: MavOdidCategoryEu,
23635    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
23636    pub class_eu: MavOdidClassEu,
23637}
23638impl OPEN_DRONE_ID_SYSTEM_DATA {
23639    pub const ENCODED_LEN: usize = 54usize;
23640    pub const DEFAULT: Self = Self {
23641        operator_latitude: 0_i32,
23642        operator_longitude: 0_i32,
23643        area_ceiling: 0.0_f32,
23644        area_floor: 0.0_f32,
23645        operator_altitude_geo: 0.0_f32,
23646        timestamp: 0_u32,
23647        area_count: 0_u16,
23648        area_radius: 0_u16,
23649        target_system: 0_u8,
23650        target_component: 0_u8,
23651        id_or_mac: [0_u8; 20usize],
23652        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
23653        classification_type: MavOdidClassificationType::DEFAULT,
23654        category_eu: MavOdidCategoryEu::DEFAULT,
23655        class_eu: MavOdidClassEu::DEFAULT,
23656    };
23657    #[cfg(feature = "arbitrary")]
23658    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23659        use arbitrary::{Arbitrary, Unstructured};
23660        let mut buf = [0u8; 1024];
23661        rng.fill_bytes(&mut buf);
23662        let mut unstructured = Unstructured::new(&buf);
23663        Self::arbitrary(&mut unstructured).unwrap_or_default()
23664    }
23665}
23666impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
23667    fn default() -> Self {
23668        Self::DEFAULT.clone()
23669    }
23670}
23671impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
23672    type Message = MavMessage;
23673    const ID: u32 = 12904u32;
23674    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
23675    const EXTRA_CRC: u8 = 77u8;
23676    const ENCODED_LEN: usize = 54usize;
23677    fn deser(
23678        _version: MavlinkVersion,
23679        __input: &[u8],
23680    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23681        let avail_len = __input.len();
23682        let mut payload_buf = [0; Self::ENCODED_LEN];
23683        let mut buf = if avail_len < Self::ENCODED_LEN {
23684            payload_buf[0..avail_len].copy_from_slice(__input);
23685            Bytes::new(&payload_buf)
23686        } else {
23687            Bytes::new(__input)
23688        };
23689        let mut __struct = Self::default();
23690        __struct.operator_latitude = buf.get_i32_le();
23691        __struct.operator_longitude = buf.get_i32_le();
23692        __struct.area_ceiling = buf.get_f32_le();
23693        __struct.area_floor = buf.get_f32_le();
23694        __struct.operator_altitude_geo = buf.get_f32_le();
23695        __struct.timestamp = buf.get_u32_le();
23696        __struct.area_count = buf.get_u16_le();
23697        __struct.area_radius = buf.get_u16_le();
23698        __struct.target_system = buf.get_u8();
23699        __struct.target_component = buf.get_u8();
23700        for v in &mut __struct.id_or_mac {
23701            let val = buf.get_u8();
23702            *v = val;
23703        }
23704        let tmp = buf.get_u8();
23705        __struct.operator_location_type =
23706            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23707                enum_type: "MavOdidOperatorLocationType",
23708                value: tmp as u64,
23709            })?;
23710        let tmp = buf.get_u8();
23711        __struct.classification_type =
23712            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23713                enum_type: "MavOdidClassificationType",
23714                value: tmp as u64,
23715            })?;
23716        let tmp = buf.get_u8();
23717        __struct.category_eu =
23718            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23719                enum_type: "MavOdidCategoryEu",
23720                value: tmp as u64,
23721            })?;
23722        let tmp = buf.get_u8();
23723        __struct.class_eu =
23724            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23725                enum_type: "MavOdidClassEu",
23726                value: tmp as u64,
23727            })?;
23728        Ok(__struct)
23729    }
23730    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23731        let mut __tmp = BytesMut::new(bytes);
23732        #[allow(clippy::absurd_extreme_comparisons)]
23733        #[allow(unused_comparisons)]
23734        if __tmp.remaining() < Self::ENCODED_LEN {
23735            panic!(
23736                "buffer is too small (need {} bytes, but got {})",
23737                Self::ENCODED_LEN,
23738                __tmp.remaining(),
23739            )
23740        }
23741        __tmp.put_i32_le(self.operator_latitude);
23742        __tmp.put_i32_le(self.operator_longitude);
23743        __tmp.put_f32_le(self.area_ceiling);
23744        __tmp.put_f32_le(self.area_floor);
23745        __tmp.put_f32_le(self.operator_altitude_geo);
23746        __tmp.put_u32_le(self.timestamp);
23747        __tmp.put_u16_le(self.area_count);
23748        __tmp.put_u16_le(self.area_radius);
23749        __tmp.put_u8(self.target_system);
23750        __tmp.put_u8(self.target_component);
23751        for val in &self.id_or_mac {
23752            __tmp.put_u8(*val);
23753        }
23754        __tmp.put_u8(self.operator_location_type as u8);
23755        __tmp.put_u8(self.classification_type as u8);
23756        __tmp.put_u8(self.category_eu as u8);
23757        __tmp.put_u8(self.class_eu as u8);
23758        if matches!(version, MavlinkVersion::V2) {
23759            let len = __tmp.len();
23760            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23761        } else {
23762            __tmp.len()
23763        }
23764    }
23765}
23766#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
23767#[doc = ""]
23768#[doc = "ID: 12919"]
23769#[derive(Debug, Clone, PartialEq)]
23770#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23771#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23772#[cfg_attr(feature = "ts", derive(TS))]
23773#[cfg_attr(feature = "ts", ts(export))]
23774pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23775    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23776    pub operator_latitude: i32,
23777    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23778    pub operator_longitude: i32,
23779    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23780    pub operator_altitude_geo: f32,
23781    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23782    pub timestamp: u32,
23783    #[doc = "System ID (0 for broadcast)."]
23784    pub target_system: u8,
23785    #[doc = "Component ID (0 for broadcast)."]
23786    pub target_component: u8,
23787}
23788impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23789    pub const ENCODED_LEN: usize = 18usize;
23790    pub const DEFAULT: Self = Self {
23791        operator_latitude: 0_i32,
23792        operator_longitude: 0_i32,
23793        operator_altitude_geo: 0.0_f32,
23794        timestamp: 0_u32,
23795        target_system: 0_u8,
23796        target_component: 0_u8,
23797    };
23798    #[cfg(feature = "arbitrary")]
23799    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23800        use arbitrary::{Arbitrary, Unstructured};
23801        let mut buf = [0u8; 1024];
23802        rng.fill_bytes(&mut buf);
23803        let mut unstructured = Unstructured::new(&buf);
23804        Self::arbitrary(&mut unstructured).unwrap_or_default()
23805    }
23806}
23807impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23808    fn default() -> Self {
23809        Self::DEFAULT.clone()
23810    }
23811}
23812impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23813    type Message = MavMessage;
23814    const ID: u32 = 12919u32;
23815    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
23816    const EXTRA_CRC: u8 = 7u8;
23817    const ENCODED_LEN: usize = 18usize;
23818    fn deser(
23819        _version: MavlinkVersion,
23820        __input: &[u8],
23821    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23822        let avail_len = __input.len();
23823        let mut payload_buf = [0; Self::ENCODED_LEN];
23824        let mut buf = if avail_len < Self::ENCODED_LEN {
23825            payload_buf[0..avail_len].copy_from_slice(__input);
23826            Bytes::new(&payload_buf)
23827        } else {
23828            Bytes::new(__input)
23829        };
23830        let mut __struct = Self::default();
23831        __struct.operator_latitude = buf.get_i32_le();
23832        __struct.operator_longitude = buf.get_i32_le();
23833        __struct.operator_altitude_geo = buf.get_f32_le();
23834        __struct.timestamp = buf.get_u32_le();
23835        __struct.target_system = buf.get_u8();
23836        __struct.target_component = buf.get_u8();
23837        Ok(__struct)
23838    }
23839    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23840        let mut __tmp = BytesMut::new(bytes);
23841        #[allow(clippy::absurd_extreme_comparisons)]
23842        #[allow(unused_comparisons)]
23843        if __tmp.remaining() < Self::ENCODED_LEN {
23844            panic!(
23845                "buffer is too small (need {} bytes, but got {})",
23846                Self::ENCODED_LEN,
23847                __tmp.remaining(),
23848            )
23849        }
23850        __tmp.put_i32_le(self.operator_latitude);
23851        __tmp.put_i32_le(self.operator_longitude);
23852        __tmp.put_f32_le(self.operator_altitude_geo);
23853        __tmp.put_u32_le(self.timestamp);
23854        __tmp.put_u8(self.target_system);
23855        __tmp.put_u8(self.target_component);
23856        if matches!(version, MavlinkVersion::V2) {
23857            let len = __tmp.len();
23858            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23859        } else {
23860            __tmp.len()
23861        }
23862    }
23863}
23864#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
23865#[doc = ""]
23866#[doc = "ID: 100"]
23867#[derive(Debug, Clone, PartialEq)]
23868#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23870#[cfg_attr(feature = "ts", derive(TS))]
23871#[cfg_attr(feature = "ts", ts(export))]
23872pub struct OPTICAL_FLOW_DATA {
23873    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23874    pub time_usec: u64,
23875    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
23876    pub flow_comp_m_x: f32,
23877    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
23878    pub flow_comp_m_y: f32,
23879    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
23880    pub ground_distance: f32,
23881    #[doc = "Flow in x-sensor direction"]
23882    pub flow_x: i16,
23883    #[doc = "Flow in y-sensor direction"]
23884    pub flow_y: i16,
23885    #[doc = "Sensor ID"]
23886    pub sensor_id: u8,
23887    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
23888    pub quality: u8,
23889    #[doc = "Flow rate about X axis"]
23890    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23891    pub flow_rate_x: f32,
23892    #[doc = "Flow rate about Y axis"]
23893    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23894    pub flow_rate_y: f32,
23895}
23896impl OPTICAL_FLOW_DATA {
23897    pub const ENCODED_LEN: usize = 34usize;
23898    pub const DEFAULT: Self = Self {
23899        time_usec: 0_u64,
23900        flow_comp_m_x: 0.0_f32,
23901        flow_comp_m_y: 0.0_f32,
23902        ground_distance: 0.0_f32,
23903        flow_x: 0_i16,
23904        flow_y: 0_i16,
23905        sensor_id: 0_u8,
23906        quality: 0_u8,
23907        flow_rate_x: 0.0_f32,
23908        flow_rate_y: 0.0_f32,
23909    };
23910    #[cfg(feature = "arbitrary")]
23911    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23912        use arbitrary::{Arbitrary, Unstructured};
23913        let mut buf = [0u8; 1024];
23914        rng.fill_bytes(&mut buf);
23915        let mut unstructured = Unstructured::new(&buf);
23916        Self::arbitrary(&mut unstructured).unwrap_or_default()
23917    }
23918}
23919impl Default for OPTICAL_FLOW_DATA {
23920    fn default() -> Self {
23921        Self::DEFAULT.clone()
23922    }
23923}
23924impl MessageData for OPTICAL_FLOW_DATA {
23925    type Message = MavMessage;
23926    const ID: u32 = 100u32;
23927    const NAME: &'static str = "OPTICAL_FLOW";
23928    const EXTRA_CRC: u8 = 175u8;
23929    const ENCODED_LEN: usize = 34usize;
23930    fn deser(
23931        _version: MavlinkVersion,
23932        __input: &[u8],
23933    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23934        let avail_len = __input.len();
23935        let mut payload_buf = [0; Self::ENCODED_LEN];
23936        let mut buf = if avail_len < Self::ENCODED_LEN {
23937            payload_buf[0..avail_len].copy_from_slice(__input);
23938            Bytes::new(&payload_buf)
23939        } else {
23940            Bytes::new(__input)
23941        };
23942        let mut __struct = Self::default();
23943        __struct.time_usec = buf.get_u64_le();
23944        __struct.flow_comp_m_x = buf.get_f32_le();
23945        __struct.flow_comp_m_y = buf.get_f32_le();
23946        __struct.ground_distance = buf.get_f32_le();
23947        __struct.flow_x = buf.get_i16_le();
23948        __struct.flow_y = buf.get_i16_le();
23949        __struct.sensor_id = buf.get_u8();
23950        __struct.quality = buf.get_u8();
23951        __struct.flow_rate_x = buf.get_f32_le();
23952        __struct.flow_rate_y = buf.get_f32_le();
23953        Ok(__struct)
23954    }
23955    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23956        let mut __tmp = BytesMut::new(bytes);
23957        #[allow(clippy::absurd_extreme_comparisons)]
23958        #[allow(unused_comparisons)]
23959        if __tmp.remaining() < Self::ENCODED_LEN {
23960            panic!(
23961                "buffer is too small (need {} bytes, but got {})",
23962                Self::ENCODED_LEN,
23963                __tmp.remaining(),
23964            )
23965        }
23966        __tmp.put_u64_le(self.time_usec);
23967        __tmp.put_f32_le(self.flow_comp_m_x);
23968        __tmp.put_f32_le(self.flow_comp_m_y);
23969        __tmp.put_f32_le(self.ground_distance);
23970        __tmp.put_i16_le(self.flow_x);
23971        __tmp.put_i16_le(self.flow_y);
23972        __tmp.put_u8(self.sensor_id);
23973        __tmp.put_u8(self.quality);
23974        if matches!(version, MavlinkVersion::V2) {
23975            __tmp.put_f32_le(self.flow_rate_x);
23976            __tmp.put_f32_le(self.flow_rate_y);
23977            let len = __tmp.len();
23978            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23979        } else {
23980            __tmp.len()
23981        }
23982    }
23983}
23984#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
23985#[doc = ""]
23986#[doc = "ID: 106"]
23987#[derive(Debug, Clone, PartialEq)]
23988#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23989#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23990#[cfg_attr(feature = "ts", derive(TS))]
23991#[cfg_attr(feature = "ts", ts(export))]
23992pub struct OPTICAL_FLOW_RAD_DATA {
23993    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23994    pub time_usec: u64,
23995    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
23996    pub integration_time_us: u32,
23997    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
23998    pub integrated_x: f32,
23999    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
24000    pub integrated_y: f32,
24001    #[doc = "RH rotation around X axis"]
24002    pub integrated_xgyro: f32,
24003    #[doc = "RH rotation around Y axis"]
24004    pub integrated_ygyro: f32,
24005    #[doc = "RH rotation around Z axis"]
24006    pub integrated_zgyro: f32,
24007    #[doc = "Time since the distance was sampled."]
24008    pub time_delta_distance_us: u32,
24009    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
24010    pub distance: f32,
24011    #[doc = "Temperature"]
24012    pub temperature: i16,
24013    #[doc = "Sensor ID"]
24014    pub sensor_id: u8,
24015    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
24016    pub quality: u8,
24017}
24018impl OPTICAL_FLOW_RAD_DATA {
24019    pub const ENCODED_LEN: usize = 44usize;
24020    pub const DEFAULT: Self = Self {
24021        time_usec: 0_u64,
24022        integration_time_us: 0_u32,
24023        integrated_x: 0.0_f32,
24024        integrated_y: 0.0_f32,
24025        integrated_xgyro: 0.0_f32,
24026        integrated_ygyro: 0.0_f32,
24027        integrated_zgyro: 0.0_f32,
24028        time_delta_distance_us: 0_u32,
24029        distance: 0.0_f32,
24030        temperature: 0_i16,
24031        sensor_id: 0_u8,
24032        quality: 0_u8,
24033    };
24034    #[cfg(feature = "arbitrary")]
24035    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24036        use arbitrary::{Arbitrary, Unstructured};
24037        let mut buf = [0u8; 1024];
24038        rng.fill_bytes(&mut buf);
24039        let mut unstructured = Unstructured::new(&buf);
24040        Self::arbitrary(&mut unstructured).unwrap_or_default()
24041    }
24042}
24043impl Default for OPTICAL_FLOW_RAD_DATA {
24044    fn default() -> Self {
24045        Self::DEFAULT.clone()
24046    }
24047}
24048impl MessageData for OPTICAL_FLOW_RAD_DATA {
24049    type Message = MavMessage;
24050    const ID: u32 = 106u32;
24051    const NAME: &'static str = "OPTICAL_FLOW_RAD";
24052    const EXTRA_CRC: u8 = 138u8;
24053    const ENCODED_LEN: usize = 44usize;
24054    fn deser(
24055        _version: MavlinkVersion,
24056        __input: &[u8],
24057    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24058        let avail_len = __input.len();
24059        let mut payload_buf = [0; Self::ENCODED_LEN];
24060        let mut buf = if avail_len < Self::ENCODED_LEN {
24061            payload_buf[0..avail_len].copy_from_slice(__input);
24062            Bytes::new(&payload_buf)
24063        } else {
24064            Bytes::new(__input)
24065        };
24066        let mut __struct = Self::default();
24067        __struct.time_usec = buf.get_u64_le();
24068        __struct.integration_time_us = buf.get_u32_le();
24069        __struct.integrated_x = buf.get_f32_le();
24070        __struct.integrated_y = buf.get_f32_le();
24071        __struct.integrated_xgyro = buf.get_f32_le();
24072        __struct.integrated_ygyro = buf.get_f32_le();
24073        __struct.integrated_zgyro = buf.get_f32_le();
24074        __struct.time_delta_distance_us = buf.get_u32_le();
24075        __struct.distance = buf.get_f32_le();
24076        __struct.temperature = buf.get_i16_le();
24077        __struct.sensor_id = buf.get_u8();
24078        __struct.quality = buf.get_u8();
24079        Ok(__struct)
24080    }
24081    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24082        let mut __tmp = BytesMut::new(bytes);
24083        #[allow(clippy::absurd_extreme_comparisons)]
24084        #[allow(unused_comparisons)]
24085        if __tmp.remaining() < Self::ENCODED_LEN {
24086            panic!(
24087                "buffer is too small (need {} bytes, but got {})",
24088                Self::ENCODED_LEN,
24089                __tmp.remaining(),
24090            )
24091        }
24092        __tmp.put_u64_le(self.time_usec);
24093        __tmp.put_u32_le(self.integration_time_us);
24094        __tmp.put_f32_le(self.integrated_x);
24095        __tmp.put_f32_le(self.integrated_y);
24096        __tmp.put_f32_le(self.integrated_xgyro);
24097        __tmp.put_f32_le(self.integrated_ygyro);
24098        __tmp.put_f32_le(self.integrated_zgyro);
24099        __tmp.put_u32_le(self.time_delta_distance_us);
24100        __tmp.put_f32_le(self.distance);
24101        __tmp.put_i16_le(self.temperature);
24102        __tmp.put_u8(self.sensor_id);
24103        __tmp.put_u8(self.quality);
24104        if matches!(version, MavlinkVersion::V2) {
24105            let len = __tmp.len();
24106            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24107        } else {
24108            __tmp.len()
24109        }
24110    }
24111}
24112#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
24113#[doc = ""]
24114#[doc = "ID: 360"]
24115#[derive(Debug, Clone, PartialEq)]
24116#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24118#[cfg_attr(feature = "ts", derive(TS))]
24119#[cfg_attr(feature = "ts", ts(export))]
24120pub struct ORBIT_EXECUTION_STATUS_DATA {
24121    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24122    pub time_usec: u64,
24123    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
24124    pub radius: f32,
24125    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
24126    pub x: i32,
24127    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
24128    pub y: i32,
24129    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
24130    pub z: f32,
24131    #[doc = "The coordinate system of the fields: x, y, z."]
24132    pub frame: MavFrame,
24133}
24134impl ORBIT_EXECUTION_STATUS_DATA {
24135    pub const ENCODED_LEN: usize = 25usize;
24136    pub const DEFAULT: Self = Self {
24137        time_usec: 0_u64,
24138        radius: 0.0_f32,
24139        x: 0_i32,
24140        y: 0_i32,
24141        z: 0.0_f32,
24142        frame: MavFrame::DEFAULT,
24143    };
24144    #[cfg(feature = "arbitrary")]
24145    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24146        use arbitrary::{Arbitrary, Unstructured};
24147        let mut buf = [0u8; 1024];
24148        rng.fill_bytes(&mut buf);
24149        let mut unstructured = Unstructured::new(&buf);
24150        Self::arbitrary(&mut unstructured).unwrap_or_default()
24151    }
24152}
24153impl Default for ORBIT_EXECUTION_STATUS_DATA {
24154    fn default() -> Self {
24155        Self::DEFAULT.clone()
24156    }
24157}
24158impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
24159    type Message = MavMessage;
24160    const ID: u32 = 360u32;
24161    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
24162    const EXTRA_CRC: u8 = 11u8;
24163    const ENCODED_LEN: usize = 25usize;
24164    fn deser(
24165        _version: MavlinkVersion,
24166        __input: &[u8],
24167    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24168        let avail_len = __input.len();
24169        let mut payload_buf = [0; Self::ENCODED_LEN];
24170        let mut buf = if avail_len < Self::ENCODED_LEN {
24171            payload_buf[0..avail_len].copy_from_slice(__input);
24172            Bytes::new(&payload_buf)
24173        } else {
24174            Bytes::new(__input)
24175        };
24176        let mut __struct = Self::default();
24177        __struct.time_usec = buf.get_u64_le();
24178        __struct.radius = buf.get_f32_le();
24179        __struct.x = buf.get_i32_le();
24180        __struct.y = buf.get_i32_le();
24181        __struct.z = buf.get_f32_le();
24182        let tmp = buf.get_u8();
24183        __struct.frame =
24184            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24185                enum_type: "MavFrame",
24186                value: tmp as u64,
24187            })?;
24188        Ok(__struct)
24189    }
24190    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24191        let mut __tmp = BytesMut::new(bytes);
24192        #[allow(clippy::absurd_extreme_comparisons)]
24193        #[allow(unused_comparisons)]
24194        if __tmp.remaining() < Self::ENCODED_LEN {
24195            panic!(
24196                "buffer is too small (need {} bytes, but got {})",
24197                Self::ENCODED_LEN,
24198                __tmp.remaining(),
24199            )
24200        }
24201        __tmp.put_u64_le(self.time_usec);
24202        __tmp.put_f32_le(self.radius);
24203        __tmp.put_i32_le(self.x);
24204        __tmp.put_i32_le(self.y);
24205        __tmp.put_f32_le(self.z);
24206        __tmp.put_u8(self.frame as u8);
24207        if matches!(version, MavlinkVersion::V2) {
24208            let len = __tmp.len();
24209            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24210        } else {
24211            __tmp.len()
24212        }
24213    }
24214}
24215#[doc = "Response from a PARAM_EXT_SET message."]
24216#[doc = ""]
24217#[doc = "ID: 324"]
24218#[derive(Debug, Clone, PartialEq)]
24219#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24221#[cfg_attr(feature = "ts", derive(TS))]
24222#[cfg_attr(feature = "ts", ts(export))]
24223pub struct PARAM_EXT_ACK_DATA {
24224    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24225    #[cfg_attr(feature = "ts", ts(type = "string"))]
24226    pub param_id: CharArray<16>,
24227    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
24228    #[cfg_attr(feature = "ts", ts(type = "string"))]
24229    pub param_value: CharArray<128>,
24230    #[doc = "Parameter type."]
24231    pub param_type: MavParamExtType,
24232    #[doc = "Result code."]
24233    pub param_result: ParamAck,
24234}
24235impl PARAM_EXT_ACK_DATA {
24236    pub const ENCODED_LEN: usize = 146usize;
24237    pub const DEFAULT: Self = Self {
24238        param_id: CharArray::new([0_u8; 16usize]),
24239        param_value: CharArray::new([0_u8; 128usize]),
24240        param_type: MavParamExtType::DEFAULT,
24241        param_result: ParamAck::DEFAULT,
24242    };
24243    #[cfg(feature = "arbitrary")]
24244    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24245        use arbitrary::{Arbitrary, Unstructured};
24246        let mut buf = [0u8; 1024];
24247        rng.fill_bytes(&mut buf);
24248        let mut unstructured = Unstructured::new(&buf);
24249        Self::arbitrary(&mut unstructured).unwrap_or_default()
24250    }
24251}
24252impl Default for PARAM_EXT_ACK_DATA {
24253    fn default() -> Self {
24254        Self::DEFAULT.clone()
24255    }
24256}
24257impl MessageData for PARAM_EXT_ACK_DATA {
24258    type Message = MavMessage;
24259    const ID: u32 = 324u32;
24260    const NAME: &'static str = "PARAM_EXT_ACK";
24261    const EXTRA_CRC: u8 = 132u8;
24262    const ENCODED_LEN: usize = 146usize;
24263    fn deser(
24264        _version: MavlinkVersion,
24265        __input: &[u8],
24266    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24267        let avail_len = __input.len();
24268        let mut payload_buf = [0; Self::ENCODED_LEN];
24269        let mut buf = if avail_len < Self::ENCODED_LEN {
24270            payload_buf[0..avail_len].copy_from_slice(__input);
24271            Bytes::new(&payload_buf)
24272        } else {
24273            Bytes::new(__input)
24274        };
24275        let mut __struct = Self::default();
24276        let mut tmp = [0_u8; 16usize];
24277        for v in &mut tmp {
24278            *v = buf.get_u8();
24279        }
24280        __struct.param_id = CharArray::new(tmp);
24281        let mut tmp = [0_u8; 128usize];
24282        for v in &mut tmp {
24283            *v = buf.get_u8();
24284        }
24285        __struct.param_value = CharArray::new(tmp);
24286        let tmp = buf.get_u8();
24287        __struct.param_type =
24288            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24289                enum_type: "MavParamExtType",
24290                value: tmp as u64,
24291            })?;
24292        let tmp = buf.get_u8();
24293        __struct.param_result =
24294            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24295                enum_type: "ParamAck",
24296                value: tmp as u64,
24297            })?;
24298        Ok(__struct)
24299    }
24300    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24301        let mut __tmp = BytesMut::new(bytes);
24302        #[allow(clippy::absurd_extreme_comparisons)]
24303        #[allow(unused_comparisons)]
24304        if __tmp.remaining() < Self::ENCODED_LEN {
24305            panic!(
24306                "buffer is too small (need {} bytes, but got {})",
24307                Self::ENCODED_LEN,
24308                __tmp.remaining(),
24309            )
24310        }
24311        for val in &self.param_id {
24312            __tmp.put_u8(*val);
24313        }
24314        for val in &self.param_value {
24315            __tmp.put_u8(*val);
24316        }
24317        __tmp.put_u8(self.param_type as u8);
24318        __tmp.put_u8(self.param_result as u8);
24319        if matches!(version, MavlinkVersion::V2) {
24320            let len = __tmp.len();
24321            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24322        } else {
24323            __tmp.len()
24324        }
24325    }
24326}
24327#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
24328#[doc = ""]
24329#[doc = "ID: 321"]
24330#[derive(Debug, Clone, PartialEq)]
24331#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24332#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24333#[cfg_attr(feature = "ts", derive(TS))]
24334#[cfg_attr(feature = "ts", ts(export))]
24335pub struct PARAM_EXT_REQUEST_LIST_DATA {
24336    #[doc = "System ID"]
24337    pub target_system: u8,
24338    #[doc = "Component ID"]
24339    pub target_component: u8,
24340}
24341impl PARAM_EXT_REQUEST_LIST_DATA {
24342    pub const ENCODED_LEN: usize = 2usize;
24343    pub const DEFAULT: Self = Self {
24344        target_system: 0_u8,
24345        target_component: 0_u8,
24346    };
24347    #[cfg(feature = "arbitrary")]
24348    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24349        use arbitrary::{Arbitrary, Unstructured};
24350        let mut buf = [0u8; 1024];
24351        rng.fill_bytes(&mut buf);
24352        let mut unstructured = Unstructured::new(&buf);
24353        Self::arbitrary(&mut unstructured).unwrap_or_default()
24354    }
24355}
24356impl Default for PARAM_EXT_REQUEST_LIST_DATA {
24357    fn default() -> Self {
24358        Self::DEFAULT.clone()
24359    }
24360}
24361impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
24362    type Message = MavMessage;
24363    const ID: u32 = 321u32;
24364    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
24365    const EXTRA_CRC: u8 = 88u8;
24366    const ENCODED_LEN: usize = 2usize;
24367    fn deser(
24368        _version: MavlinkVersion,
24369        __input: &[u8],
24370    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24371        let avail_len = __input.len();
24372        let mut payload_buf = [0; Self::ENCODED_LEN];
24373        let mut buf = if avail_len < Self::ENCODED_LEN {
24374            payload_buf[0..avail_len].copy_from_slice(__input);
24375            Bytes::new(&payload_buf)
24376        } else {
24377            Bytes::new(__input)
24378        };
24379        let mut __struct = Self::default();
24380        __struct.target_system = buf.get_u8();
24381        __struct.target_component = buf.get_u8();
24382        Ok(__struct)
24383    }
24384    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24385        let mut __tmp = BytesMut::new(bytes);
24386        #[allow(clippy::absurd_extreme_comparisons)]
24387        #[allow(unused_comparisons)]
24388        if __tmp.remaining() < Self::ENCODED_LEN {
24389            panic!(
24390                "buffer is too small (need {} bytes, but got {})",
24391                Self::ENCODED_LEN,
24392                __tmp.remaining(),
24393            )
24394        }
24395        __tmp.put_u8(self.target_system);
24396        __tmp.put_u8(self.target_component);
24397        if matches!(version, MavlinkVersion::V2) {
24398            let len = __tmp.len();
24399            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24400        } else {
24401            __tmp.len()
24402        }
24403    }
24404}
24405#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
24406#[doc = ""]
24407#[doc = "ID: 320"]
24408#[derive(Debug, Clone, PartialEq)]
24409#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24410#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24411#[cfg_attr(feature = "ts", derive(TS))]
24412#[cfg_attr(feature = "ts", ts(export))]
24413pub struct PARAM_EXT_REQUEST_READ_DATA {
24414    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
24415    pub param_index: i16,
24416    #[doc = "System ID"]
24417    pub target_system: u8,
24418    #[doc = "Component ID"]
24419    pub target_component: u8,
24420    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24421    #[cfg_attr(feature = "ts", ts(type = "string"))]
24422    pub param_id: CharArray<16>,
24423}
24424impl PARAM_EXT_REQUEST_READ_DATA {
24425    pub const ENCODED_LEN: usize = 20usize;
24426    pub const DEFAULT: Self = Self {
24427        param_index: 0_i16,
24428        target_system: 0_u8,
24429        target_component: 0_u8,
24430        param_id: CharArray::new([0_u8; 16usize]),
24431    };
24432    #[cfg(feature = "arbitrary")]
24433    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24434        use arbitrary::{Arbitrary, Unstructured};
24435        let mut buf = [0u8; 1024];
24436        rng.fill_bytes(&mut buf);
24437        let mut unstructured = Unstructured::new(&buf);
24438        Self::arbitrary(&mut unstructured).unwrap_or_default()
24439    }
24440}
24441impl Default for PARAM_EXT_REQUEST_READ_DATA {
24442    fn default() -> Self {
24443        Self::DEFAULT.clone()
24444    }
24445}
24446impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
24447    type Message = MavMessage;
24448    const ID: u32 = 320u32;
24449    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
24450    const EXTRA_CRC: u8 = 243u8;
24451    const ENCODED_LEN: usize = 20usize;
24452    fn deser(
24453        _version: MavlinkVersion,
24454        __input: &[u8],
24455    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24456        let avail_len = __input.len();
24457        let mut payload_buf = [0; Self::ENCODED_LEN];
24458        let mut buf = if avail_len < Self::ENCODED_LEN {
24459            payload_buf[0..avail_len].copy_from_slice(__input);
24460            Bytes::new(&payload_buf)
24461        } else {
24462            Bytes::new(__input)
24463        };
24464        let mut __struct = Self::default();
24465        __struct.param_index = buf.get_i16_le();
24466        __struct.target_system = buf.get_u8();
24467        __struct.target_component = buf.get_u8();
24468        let mut tmp = [0_u8; 16usize];
24469        for v in &mut tmp {
24470            *v = buf.get_u8();
24471        }
24472        __struct.param_id = CharArray::new(tmp);
24473        Ok(__struct)
24474    }
24475    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24476        let mut __tmp = BytesMut::new(bytes);
24477        #[allow(clippy::absurd_extreme_comparisons)]
24478        #[allow(unused_comparisons)]
24479        if __tmp.remaining() < Self::ENCODED_LEN {
24480            panic!(
24481                "buffer is too small (need {} bytes, but got {})",
24482                Self::ENCODED_LEN,
24483                __tmp.remaining(),
24484            )
24485        }
24486        __tmp.put_i16_le(self.param_index);
24487        __tmp.put_u8(self.target_system);
24488        __tmp.put_u8(self.target_component);
24489        for val in &self.param_id {
24490            __tmp.put_u8(*val);
24491        }
24492        if matches!(version, MavlinkVersion::V2) {
24493            let len = __tmp.len();
24494            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24495        } else {
24496            __tmp.len()
24497        }
24498    }
24499}
24500#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
24501#[doc = ""]
24502#[doc = "ID: 323"]
24503#[derive(Debug, Clone, PartialEq)]
24504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24505#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24506#[cfg_attr(feature = "ts", derive(TS))]
24507#[cfg_attr(feature = "ts", ts(export))]
24508pub struct PARAM_EXT_SET_DATA {
24509    #[doc = "System ID"]
24510    pub target_system: u8,
24511    #[doc = "Component ID"]
24512    pub target_component: u8,
24513    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24514    #[cfg_attr(feature = "ts", ts(type = "string"))]
24515    pub param_id: CharArray<16>,
24516    #[doc = "Parameter value"]
24517    #[cfg_attr(feature = "ts", ts(type = "string"))]
24518    pub param_value: CharArray<128>,
24519    #[doc = "Parameter type."]
24520    pub param_type: MavParamExtType,
24521}
24522impl PARAM_EXT_SET_DATA {
24523    pub const ENCODED_LEN: usize = 147usize;
24524    pub const DEFAULT: Self = Self {
24525        target_system: 0_u8,
24526        target_component: 0_u8,
24527        param_id: CharArray::new([0_u8; 16usize]),
24528        param_value: CharArray::new([0_u8; 128usize]),
24529        param_type: MavParamExtType::DEFAULT,
24530    };
24531    #[cfg(feature = "arbitrary")]
24532    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24533        use arbitrary::{Arbitrary, Unstructured};
24534        let mut buf = [0u8; 1024];
24535        rng.fill_bytes(&mut buf);
24536        let mut unstructured = Unstructured::new(&buf);
24537        Self::arbitrary(&mut unstructured).unwrap_or_default()
24538    }
24539}
24540impl Default for PARAM_EXT_SET_DATA {
24541    fn default() -> Self {
24542        Self::DEFAULT.clone()
24543    }
24544}
24545impl MessageData for PARAM_EXT_SET_DATA {
24546    type Message = MavMessage;
24547    const ID: u32 = 323u32;
24548    const NAME: &'static str = "PARAM_EXT_SET";
24549    const EXTRA_CRC: u8 = 78u8;
24550    const ENCODED_LEN: usize = 147usize;
24551    fn deser(
24552        _version: MavlinkVersion,
24553        __input: &[u8],
24554    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24555        let avail_len = __input.len();
24556        let mut payload_buf = [0; Self::ENCODED_LEN];
24557        let mut buf = if avail_len < Self::ENCODED_LEN {
24558            payload_buf[0..avail_len].copy_from_slice(__input);
24559            Bytes::new(&payload_buf)
24560        } else {
24561            Bytes::new(__input)
24562        };
24563        let mut __struct = Self::default();
24564        __struct.target_system = buf.get_u8();
24565        __struct.target_component = buf.get_u8();
24566        let mut tmp = [0_u8; 16usize];
24567        for v in &mut tmp {
24568            *v = buf.get_u8();
24569        }
24570        __struct.param_id = CharArray::new(tmp);
24571        let mut tmp = [0_u8; 128usize];
24572        for v in &mut tmp {
24573            *v = buf.get_u8();
24574        }
24575        __struct.param_value = CharArray::new(tmp);
24576        let tmp = buf.get_u8();
24577        __struct.param_type =
24578            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24579                enum_type: "MavParamExtType",
24580                value: tmp as u64,
24581            })?;
24582        Ok(__struct)
24583    }
24584    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24585        let mut __tmp = BytesMut::new(bytes);
24586        #[allow(clippy::absurd_extreme_comparisons)]
24587        #[allow(unused_comparisons)]
24588        if __tmp.remaining() < Self::ENCODED_LEN {
24589            panic!(
24590                "buffer is too small (need {} bytes, but got {})",
24591                Self::ENCODED_LEN,
24592                __tmp.remaining(),
24593            )
24594        }
24595        __tmp.put_u8(self.target_system);
24596        __tmp.put_u8(self.target_component);
24597        for val in &self.param_id {
24598            __tmp.put_u8(*val);
24599        }
24600        for val in &self.param_value {
24601            __tmp.put_u8(*val);
24602        }
24603        __tmp.put_u8(self.param_type as u8);
24604        if matches!(version, MavlinkVersion::V2) {
24605            let len = __tmp.len();
24606            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24607        } else {
24608            __tmp.len()
24609        }
24610    }
24611}
24612#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
24613#[doc = ""]
24614#[doc = "ID: 322"]
24615#[derive(Debug, Clone, PartialEq)]
24616#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24617#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24618#[cfg_attr(feature = "ts", derive(TS))]
24619#[cfg_attr(feature = "ts", ts(export))]
24620pub struct PARAM_EXT_VALUE_DATA {
24621    #[doc = "Total number of parameters"]
24622    pub param_count: u16,
24623    #[doc = "Index of this parameter"]
24624    pub param_index: u16,
24625    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24626    #[cfg_attr(feature = "ts", ts(type = "string"))]
24627    pub param_id: CharArray<16>,
24628    #[doc = "Parameter value"]
24629    #[cfg_attr(feature = "ts", ts(type = "string"))]
24630    pub param_value: CharArray<128>,
24631    #[doc = "Parameter type."]
24632    pub param_type: MavParamExtType,
24633}
24634impl PARAM_EXT_VALUE_DATA {
24635    pub const ENCODED_LEN: usize = 149usize;
24636    pub const DEFAULT: Self = Self {
24637        param_count: 0_u16,
24638        param_index: 0_u16,
24639        param_id: CharArray::new([0_u8; 16usize]),
24640        param_value: CharArray::new([0_u8; 128usize]),
24641        param_type: MavParamExtType::DEFAULT,
24642    };
24643    #[cfg(feature = "arbitrary")]
24644    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24645        use arbitrary::{Arbitrary, Unstructured};
24646        let mut buf = [0u8; 1024];
24647        rng.fill_bytes(&mut buf);
24648        let mut unstructured = Unstructured::new(&buf);
24649        Self::arbitrary(&mut unstructured).unwrap_or_default()
24650    }
24651}
24652impl Default for PARAM_EXT_VALUE_DATA {
24653    fn default() -> Self {
24654        Self::DEFAULT.clone()
24655    }
24656}
24657impl MessageData for PARAM_EXT_VALUE_DATA {
24658    type Message = MavMessage;
24659    const ID: u32 = 322u32;
24660    const NAME: &'static str = "PARAM_EXT_VALUE";
24661    const EXTRA_CRC: u8 = 243u8;
24662    const ENCODED_LEN: usize = 149usize;
24663    fn deser(
24664        _version: MavlinkVersion,
24665        __input: &[u8],
24666    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24667        let avail_len = __input.len();
24668        let mut payload_buf = [0; Self::ENCODED_LEN];
24669        let mut buf = if avail_len < Self::ENCODED_LEN {
24670            payload_buf[0..avail_len].copy_from_slice(__input);
24671            Bytes::new(&payload_buf)
24672        } else {
24673            Bytes::new(__input)
24674        };
24675        let mut __struct = Self::default();
24676        __struct.param_count = buf.get_u16_le();
24677        __struct.param_index = buf.get_u16_le();
24678        let mut tmp = [0_u8; 16usize];
24679        for v in &mut tmp {
24680            *v = buf.get_u8();
24681        }
24682        __struct.param_id = CharArray::new(tmp);
24683        let mut tmp = [0_u8; 128usize];
24684        for v in &mut tmp {
24685            *v = buf.get_u8();
24686        }
24687        __struct.param_value = CharArray::new(tmp);
24688        let tmp = buf.get_u8();
24689        __struct.param_type =
24690            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24691                enum_type: "MavParamExtType",
24692                value: tmp as u64,
24693            })?;
24694        Ok(__struct)
24695    }
24696    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24697        let mut __tmp = BytesMut::new(bytes);
24698        #[allow(clippy::absurd_extreme_comparisons)]
24699        #[allow(unused_comparisons)]
24700        if __tmp.remaining() < Self::ENCODED_LEN {
24701            panic!(
24702                "buffer is too small (need {} bytes, but got {})",
24703                Self::ENCODED_LEN,
24704                __tmp.remaining(),
24705            )
24706        }
24707        __tmp.put_u16_le(self.param_count);
24708        __tmp.put_u16_le(self.param_index);
24709        for val in &self.param_id {
24710            __tmp.put_u8(*val);
24711        }
24712        for val in &self.param_value {
24713            __tmp.put_u8(*val);
24714        }
24715        __tmp.put_u8(self.param_type as u8);
24716        if matches!(version, MavlinkVersion::V2) {
24717            let len = __tmp.len();
24718            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24719        } else {
24720            __tmp.len()
24721        }
24722    }
24723}
24724#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
24725#[doc = ""]
24726#[doc = "ID: 50"]
24727#[derive(Debug, Clone, PartialEq)]
24728#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24729#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24730#[cfg_attr(feature = "ts", derive(TS))]
24731#[cfg_attr(feature = "ts", ts(export))]
24732pub struct PARAM_MAP_RC_DATA {
24733    #[doc = "Initial parameter value"]
24734    pub param_value0: f32,
24735    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
24736    pub scale: f32,
24737    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
24738    pub param_value_min: f32,
24739    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
24740    pub param_value_max: f32,
24741    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
24742    pub param_index: i16,
24743    #[doc = "System ID"]
24744    pub target_system: u8,
24745    #[doc = "Component ID"]
24746    pub target_component: u8,
24747    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24748    #[cfg_attr(feature = "ts", ts(type = "string"))]
24749    pub param_id: CharArray<16>,
24750    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
24751    pub parameter_rc_channel_index: u8,
24752}
24753impl PARAM_MAP_RC_DATA {
24754    pub const ENCODED_LEN: usize = 37usize;
24755    pub const DEFAULT: Self = Self {
24756        param_value0: 0.0_f32,
24757        scale: 0.0_f32,
24758        param_value_min: 0.0_f32,
24759        param_value_max: 0.0_f32,
24760        param_index: 0_i16,
24761        target_system: 0_u8,
24762        target_component: 0_u8,
24763        param_id: CharArray::new([0_u8; 16usize]),
24764        parameter_rc_channel_index: 0_u8,
24765    };
24766    #[cfg(feature = "arbitrary")]
24767    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24768        use arbitrary::{Arbitrary, Unstructured};
24769        let mut buf = [0u8; 1024];
24770        rng.fill_bytes(&mut buf);
24771        let mut unstructured = Unstructured::new(&buf);
24772        Self::arbitrary(&mut unstructured).unwrap_or_default()
24773    }
24774}
24775impl Default for PARAM_MAP_RC_DATA {
24776    fn default() -> Self {
24777        Self::DEFAULT.clone()
24778    }
24779}
24780impl MessageData for PARAM_MAP_RC_DATA {
24781    type Message = MavMessage;
24782    const ID: u32 = 50u32;
24783    const NAME: &'static str = "PARAM_MAP_RC";
24784    const EXTRA_CRC: u8 = 78u8;
24785    const ENCODED_LEN: usize = 37usize;
24786    fn deser(
24787        _version: MavlinkVersion,
24788        __input: &[u8],
24789    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24790        let avail_len = __input.len();
24791        let mut payload_buf = [0; Self::ENCODED_LEN];
24792        let mut buf = if avail_len < Self::ENCODED_LEN {
24793            payload_buf[0..avail_len].copy_from_slice(__input);
24794            Bytes::new(&payload_buf)
24795        } else {
24796            Bytes::new(__input)
24797        };
24798        let mut __struct = Self::default();
24799        __struct.param_value0 = buf.get_f32_le();
24800        __struct.scale = buf.get_f32_le();
24801        __struct.param_value_min = buf.get_f32_le();
24802        __struct.param_value_max = buf.get_f32_le();
24803        __struct.param_index = buf.get_i16_le();
24804        __struct.target_system = buf.get_u8();
24805        __struct.target_component = buf.get_u8();
24806        let mut tmp = [0_u8; 16usize];
24807        for v in &mut tmp {
24808            *v = buf.get_u8();
24809        }
24810        __struct.param_id = CharArray::new(tmp);
24811        __struct.parameter_rc_channel_index = buf.get_u8();
24812        Ok(__struct)
24813    }
24814    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24815        let mut __tmp = BytesMut::new(bytes);
24816        #[allow(clippy::absurd_extreme_comparisons)]
24817        #[allow(unused_comparisons)]
24818        if __tmp.remaining() < Self::ENCODED_LEN {
24819            panic!(
24820                "buffer is too small (need {} bytes, but got {})",
24821                Self::ENCODED_LEN,
24822                __tmp.remaining(),
24823            )
24824        }
24825        __tmp.put_f32_le(self.param_value0);
24826        __tmp.put_f32_le(self.scale);
24827        __tmp.put_f32_le(self.param_value_min);
24828        __tmp.put_f32_le(self.param_value_max);
24829        __tmp.put_i16_le(self.param_index);
24830        __tmp.put_u8(self.target_system);
24831        __tmp.put_u8(self.target_component);
24832        for val in &self.param_id {
24833            __tmp.put_u8(*val);
24834        }
24835        __tmp.put_u8(self.parameter_rc_channel_index);
24836        if matches!(version, MavlinkVersion::V2) {
24837            let len = __tmp.len();
24838            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24839        } else {
24840            __tmp.len()
24841        }
24842    }
24843}
24844#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24845#[doc = ""]
24846#[doc = "ID: 21"]
24847#[derive(Debug, Clone, PartialEq)]
24848#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24849#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24850#[cfg_attr(feature = "ts", derive(TS))]
24851#[cfg_attr(feature = "ts", ts(export))]
24852pub struct PARAM_REQUEST_LIST_DATA {
24853    #[doc = "System ID"]
24854    pub target_system: u8,
24855    #[doc = "Component ID"]
24856    pub target_component: u8,
24857}
24858impl PARAM_REQUEST_LIST_DATA {
24859    pub const ENCODED_LEN: usize = 2usize;
24860    pub const DEFAULT: Self = Self {
24861        target_system: 0_u8,
24862        target_component: 0_u8,
24863    };
24864    #[cfg(feature = "arbitrary")]
24865    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24866        use arbitrary::{Arbitrary, Unstructured};
24867        let mut buf = [0u8; 1024];
24868        rng.fill_bytes(&mut buf);
24869        let mut unstructured = Unstructured::new(&buf);
24870        Self::arbitrary(&mut unstructured).unwrap_or_default()
24871    }
24872}
24873impl Default for PARAM_REQUEST_LIST_DATA {
24874    fn default() -> Self {
24875        Self::DEFAULT.clone()
24876    }
24877}
24878impl MessageData for PARAM_REQUEST_LIST_DATA {
24879    type Message = MavMessage;
24880    const ID: u32 = 21u32;
24881    const NAME: &'static str = "PARAM_REQUEST_LIST";
24882    const EXTRA_CRC: u8 = 159u8;
24883    const ENCODED_LEN: usize = 2usize;
24884    fn deser(
24885        _version: MavlinkVersion,
24886        __input: &[u8],
24887    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24888        let avail_len = __input.len();
24889        let mut payload_buf = [0; Self::ENCODED_LEN];
24890        let mut buf = if avail_len < Self::ENCODED_LEN {
24891            payload_buf[0..avail_len].copy_from_slice(__input);
24892            Bytes::new(&payload_buf)
24893        } else {
24894            Bytes::new(__input)
24895        };
24896        let mut __struct = Self::default();
24897        __struct.target_system = buf.get_u8();
24898        __struct.target_component = buf.get_u8();
24899        Ok(__struct)
24900    }
24901    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24902        let mut __tmp = BytesMut::new(bytes);
24903        #[allow(clippy::absurd_extreme_comparisons)]
24904        #[allow(unused_comparisons)]
24905        if __tmp.remaining() < Self::ENCODED_LEN {
24906            panic!(
24907                "buffer is too small (need {} bytes, but got {})",
24908                Self::ENCODED_LEN,
24909                __tmp.remaining(),
24910            )
24911        }
24912        __tmp.put_u8(self.target_system);
24913        __tmp.put_u8(self.target_component);
24914        if matches!(version, MavlinkVersion::V2) {
24915            let len = __tmp.len();
24916            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24917        } else {
24918            __tmp.len()
24919        }
24920    }
24921}
24922#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
24923#[doc = ""]
24924#[doc = "ID: 20"]
24925#[derive(Debug, Clone, PartialEq)]
24926#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24927#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24928#[cfg_attr(feature = "ts", derive(TS))]
24929#[cfg_attr(feature = "ts", ts(export))]
24930pub struct PARAM_REQUEST_READ_DATA {
24931    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
24932    pub param_index: i16,
24933    #[doc = "System ID"]
24934    pub target_system: u8,
24935    #[doc = "Component ID"]
24936    pub target_component: u8,
24937    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24938    #[cfg_attr(feature = "ts", ts(type = "string"))]
24939    pub param_id: CharArray<16>,
24940}
24941impl PARAM_REQUEST_READ_DATA {
24942    pub const ENCODED_LEN: usize = 20usize;
24943    pub const DEFAULT: Self = Self {
24944        param_index: 0_i16,
24945        target_system: 0_u8,
24946        target_component: 0_u8,
24947        param_id: CharArray::new([0_u8; 16usize]),
24948    };
24949    #[cfg(feature = "arbitrary")]
24950    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24951        use arbitrary::{Arbitrary, Unstructured};
24952        let mut buf = [0u8; 1024];
24953        rng.fill_bytes(&mut buf);
24954        let mut unstructured = Unstructured::new(&buf);
24955        Self::arbitrary(&mut unstructured).unwrap_or_default()
24956    }
24957}
24958impl Default for PARAM_REQUEST_READ_DATA {
24959    fn default() -> Self {
24960        Self::DEFAULT.clone()
24961    }
24962}
24963impl MessageData for PARAM_REQUEST_READ_DATA {
24964    type Message = MavMessage;
24965    const ID: u32 = 20u32;
24966    const NAME: &'static str = "PARAM_REQUEST_READ";
24967    const EXTRA_CRC: u8 = 214u8;
24968    const ENCODED_LEN: usize = 20usize;
24969    fn deser(
24970        _version: MavlinkVersion,
24971        __input: &[u8],
24972    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24973        let avail_len = __input.len();
24974        let mut payload_buf = [0; Self::ENCODED_LEN];
24975        let mut buf = if avail_len < Self::ENCODED_LEN {
24976            payload_buf[0..avail_len].copy_from_slice(__input);
24977            Bytes::new(&payload_buf)
24978        } else {
24979            Bytes::new(__input)
24980        };
24981        let mut __struct = Self::default();
24982        __struct.param_index = buf.get_i16_le();
24983        __struct.target_system = buf.get_u8();
24984        __struct.target_component = buf.get_u8();
24985        let mut tmp = [0_u8; 16usize];
24986        for v in &mut tmp {
24987            *v = buf.get_u8();
24988        }
24989        __struct.param_id = CharArray::new(tmp);
24990        Ok(__struct)
24991    }
24992    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24993        let mut __tmp = BytesMut::new(bytes);
24994        #[allow(clippy::absurd_extreme_comparisons)]
24995        #[allow(unused_comparisons)]
24996        if __tmp.remaining() < Self::ENCODED_LEN {
24997            panic!(
24998                "buffer is too small (need {} bytes, but got {})",
24999                Self::ENCODED_LEN,
25000                __tmp.remaining(),
25001            )
25002        }
25003        __tmp.put_i16_le(self.param_index);
25004        __tmp.put_u8(self.target_system);
25005        __tmp.put_u8(self.target_component);
25006        for val in &self.param_id {
25007            __tmp.put_u8(*val);
25008        }
25009        if matches!(version, MavlinkVersion::V2) {
25010            let len = __tmp.len();
25011            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25012        } else {
25013            __tmp.len()
25014        }
25015    }
25016}
25017#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
25018#[doc = ""]
25019#[doc = "ID: 23"]
25020#[derive(Debug, Clone, PartialEq)]
25021#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25022#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25023#[cfg_attr(feature = "ts", derive(TS))]
25024#[cfg_attr(feature = "ts", ts(export))]
25025pub struct PARAM_SET_DATA {
25026    #[doc = "Onboard parameter value"]
25027    pub param_value: f32,
25028    #[doc = "System ID"]
25029    pub target_system: u8,
25030    #[doc = "Component ID"]
25031    pub target_component: u8,
25032    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25033    #[cfg_attr(feature = "ts", ts(type = "string"))]
25034    pub param_id: CharArray<16>,
25035    #[doc = "Onboard parameter type."]
25036    pub param_type: MavParamType,
25037}
25038impl PARAM_SET_DATA {
25039    pub const ENCODED_LEN: usize = 23usize;
25040    pub const DEFAULT: Self = Self {
25041        param_value: 0.0_f32,
25042        target_system: 0_u8,
25043        target_component: 0_u8,
25044        param_id: CharArray::new([0_u8; 16usize]),
25045        param_type: MavParamType::DEFAULT,
25046    };
25047    #[cfg(feature = "arbitrary")]
25048    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25049        use arbitrary::{Arbitrary, Unstructured};
25050        let mut buf = [0u8; 1024];
25051        rng.fill_bytes(&mut buf);
25052        let mut unstructured = Unstructured::new(&buf);
25053        Self::arbitrary(&mut unstructured).unwrap_or_default()
25054    }
25055}
25056impl Default for PARAM_SET_DATA {
25057    fn default() -> Self {
25058        Self::DEFAULT.clone()
25059    }
25060}
25061impl MessageData for PARAM_SET_DATA {
25062    type Message = MavMessage;
25063    const ID: u32 = 23u32;
25064    const NAME: &'static str = "PARAM_SET";
25065    const EXTRA_CRC: u8 = 168u8;
25066    const ENCODED_LEN: usize = 23usize;
25067    fn deser(
25068        _version: MavlinkVersion,
25069        __input: &[u8],
25070    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25071        let avail_len = __input.len();
25072        let mut payload_buf = [0; Self::ENCODED_LEN];
25073        let mut buf = if avail_len < Self::ENCODED_LEN {
25074            payload_buf[0..avail_len].copy_from_slice(__input);
25075            Bytes::new(&payload_buf)
25076        } else {
25077            Bytes::new(__input)
25078        };
25079        let mut __struct = Self::default();
25080        __struct.param_value = buf.get_f32_le();
25081        __struct.target_system = buf.get_u8();
25082        __struct.target_component = buf.get_u8();
25083        let mut tmp = [0_u8; 16usize];
25084        for v in &mut tmp {
25085            *v = buf.get_u8();
25086        }
25087        __struct.param_id = CharArray::new(tmp);
25088        let tmp = buf.get_u8();
25089        __struct.param_type =
25090            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25091                enum_type: "MavParamType",
25092                value: tmp as u64,
25093            })?;
25094        Ok(__struct)
25095    }
25096    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25097        let mut __tmp = BytesMut::new(bytes);
25098        #[allow(clippy::absurd_extreme_comparisons)]
25099        #[allow(unused_comparisons)]
25100        if __tmp.remaining() < Self::ENCODED_LEN {
25101            panic!(
25102                "buffer is too small (need {} bytes, but got {})",
25103                Self::ENCODED_LEN,
25104                __tmp.remaining(),
25105            )
25106        }
25107        __tmp.put_f32_le(self.param_value);
25108        __tmp.put_u8(self.target_system);
25109        __tmp.put_u8(self.target_component);
25110        for val in &self.param_id {
25111            __tmp.put_u8(*val);
25112        }
25113        __tmp.put_u8(self.param_type as u8);
25114        if matches!(version, MavlinkVersion::V2) {
25115            let len = __tmp.len();
25116            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25117        } else {
25118            __tmp.len()
25119        }
25120    }
25121}
25122#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
25123#[doc = ""]
25124#[doc = "ID: 22"]
25125#[derive(Debug, Clone, PartialEq)]
25126#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25127#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25128#[cfg_attr(feature = "ts", derive(TS))]
25129#[cfg_attr(feature = "ts", ts(export))]
25130pub struct PARAM_VALUE_DATA {
25131    #[doc = "Onboard parameter value"]
25132    pub param_value: f32,
25133    #[doc = "Total number of onboard parameters"]
25134    pub param_count: u16,
25135    #[doc = "Index of this onboard parameter"]
25136    pub param_index: u16,
25137    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25138    #[cfg_attr(feature = "ts", ts(type = "string"))]
25139    pub param_id: CharArray<16>,
25140    #[doc = "Onboard parameter type."]
25141    pub param_type: MavParamType,
25142}
25143impl PARAM_VALUE_DATA {
25144    pub const ENCODED_LEN: usize = 25usize;
25145    pub const DEFAULT: Self = Self {
25146        param_value: 0.0_f32,
25147        param_count: 0_u16,
25148        param_index: 0_u16,
25149        param_id: CharArray::new([0_u8; 16usize]),
25150        param_type: MavParamType::DEFAULT,
25151    };
25152    #[cfg(feature = "arbitrary")]
25153    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25154        use arbitrary::{Arbitrary, Unstructured};
25155        let mut buf = [0u8; 1024];
25156        rng.fill_bytes(&mut buf);
25157        let mut unstructured = Unstructured::new(&buf);
25158        Self::arbitrary(&mut unstructured).unwrap_or_default()
25159    }
25160}
25161impl Default for PARAM_VALUE_DATA {
25162    fn default() -> Self {
25163        Self::DEFAULT.clone()
25164    }
25165}
25166impl MessageData for PARAM_VALUE_DATA {
25167    type Message = MavMessage;
25168    const ID: u32 = 22u32;
25169    const NAME: &'static str = "PARAM_VALUE";
25170    const EXTRA_CRC: u8 = 220u8;
25171    const ENCODED_LEN: usize = 25usize;
25172    fn deser(
25173        _version: MavlinkVersion,
25174        __input: &[u8],
25175    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25176        let avail_len = __input.len();
25177        let mut payload_buf = [0; Self::ENCODED_LEN];
25178        let mut buf = if avail_len < Self::ENCODED_LEN {
25179            payload_buf[0..avail_len].copy_from_slice(__input);
25180            Bytes::new(&payload_buf)
25181        } else {
25182            Bytes::new(__input)
25183        };
25184        let mut __struct = Self::default();
25185        __struct.param_value = buf.get_f32_le();
25186        __struct.param_count = buf.get_u16_le();
25187        __struct.param_index = buf.get_u16_le();
25188        let mut tmp = [0_u8; 16usize];
25189        for v in &mut tmp {
25190            *v = buf.get_u8();
25191        }
25192        __struct.param_id = CharArray::new(tmp);
25193        let tmp = buf.get_u8();
25194        __struct.param_type =
25195            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25196                enum_type: "MavParamType",
25197                value: tmp as u64,
25198            })?;
25199        Ok(__struct)
25200    }
25201    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25202        let mut __tmp = BytesMut::new(bytes);
25203        #[allow(clippy::absurd_extreme_comparisons)]
25204        #[allow(unused_comparisons)]
25205        if __tmp.remaining() < Self::ENCODED_LEN {
25206            panic!(
25207                "buffer is too small (need {} bytes, but got {})",
25208                Self::ENCODED_LEN,
25209                __tmp.remaining(),
25210            )
25211        }
25212        __tmp.put_f32_le(self.param_value);
25213        __tmp.put_u16_le(self.param_count);
25214        __tmp.put_u16_le(self.param_index);
25215        for val in &self.param_id {
25216            __tmp.put_u8(*val);
25217        }
25218        __tmp.put_u8(self.param_type as u8);
25219        if matches!(version, MavlinkVersion::V2) {
25220            let len = __tmp.len();
25221            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25222        } else {
25223            __tmp.len()
25224        }
25225    }
25226}
25227#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
25228#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
25229#[doc = ""]
25230#[doc = "ID: 4"]
25231#[derive(Debug, Clone, PartialEq)]
25232#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25233#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25234#[cfg_attr(feature = "ts", derive(TS))]
25235#[cfg_attr(feature = "ts", ts(export))]
25236pub struct PING_DATA {
25237    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25238    pub time_usec: u64,
25239    #[doc = "PING sequence"]
25240    pub seq: u32,
25241    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
25242    pub target_system: u8,
25243    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
25244    pub target_component: u8,
25245}
25246impl PING_DATA {
25247    pub const ENCODED_LEN: usize = 14usize;
25248    pub const DEFAULT: Self = Self {
25249        time_usec: 0_u64,
25250        seq: 0_u32,
25251        target_system: 0_u8,
25252        target_component: 0_u8,
25253    };
25254    #[cfg(feature = "arbitrary")]
25255    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25256        use arbitrary::{Arbitrary, Unstructured};
25257        let mut buf = [0u8; 1024];
25258        rng.fill_bytes(&mut buf);
25259        let mut unstructured = Unstructured::new(&buf);
25260        Self::arbitrary(&mut unstructured).unwrap_or_default()
25261    }
25262}
25263impl Default for PING_DATA {
25264    fn default() -> Self {
25265        Self::DEFAULT.clone()
25266    }
25267}
25268impl MessageData for PING_DATA {
25269    type Message = MavMessage;
25270    const ID: u32 = 4u32;
25271    const NAME: &'static str = "PING";
25272    const EXTRA_CRC: u8 = 237u8;
25273    const ENCODED_LEN: usize = 14usize;
25274    fn deser(
25275        _version: MavlinkVersion,
25276        __input: &[u8],
25277    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25278        let avail_len = __input.len();
25279        let mut payload_buf = [0; Self::ENCODED_LEN];
25280        let mut buf = if avail_len < Self::ENCODED_LEN {
25281            payload_buf[0..avail_len].copy_from_slice(__input);
25282            Bytes::new(&payload_buf)
25283        } else {
25284            Bytes::new(__input)
25285        };
25286        let mut __struct = Self::default();
25287        __struct.time_usec = buf.get_u64_le();
25288        __struct.seq = buf.get_u32_le();
25289        __struct.target_system = buf.get_u8();
25290        __struct.target_component = buf.get_u8();
25291        Ok(__struct)
25292    }
25293    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25294        let mut __tmp = BytesMut::new(bytes);
25295        #[allow(clippy::absurd_extreme_comparisons)]
25296        #[allow(unused_comparisons)]
25297        if __tmp.remaining() < Self::ENCODED_LEN {
25298            panic!(
25299                "buffer is too small (need {} bytes, but got {})",
25300                Self::ENCODED_LEN,
25301                __tmp.remaining(),
25302            )
25303        }
25304        __tmp.put_u64_le(self.time_usec);
25305        __tmp.put_u32_le(self.seq);
25306        __tmp.put_u8(self.target_system);
25307        __tmp.put_u8(self.target_component);
25308        if matches!(version, MavlinkVersion::V2) {
25309            let len = __tmp.len();
25310            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25311        } else {
25312            __tmp.len()
25313        }
25314    }
25315}
25316#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
25317#[doc = "Control vehicle tone generation (buzzer)."]
25318#[doc = ""]
25319#[doc = "ID: 258"]
25320#[derive(Debug, Clone, PartialEq)]
25321#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25322#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25323#[cfg_attr(feature = "ts", derive(TS))]
25324#[cfg_attr(feature = "ts", ts(export))]
25325pub struct PLAY_TUNE_DATA {
25326    #[doc = "System ID"]
25327    pub target_system: u8,
25328    #[doc = "Component ID"]
25329    pub target_component: u8,
25330    #[doc = "tune in board specific format"]
25331    #[cfg_attr(feature = "ts", ts(type = "string"))]
25332    pub tune: CharArray<30>,
25333    #[doc = "tune extension (appended to tune)"]
25334    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25335    #[cfg_attr(feature = "ts", ts(type = "string"))]
25336    pub tune2: CharArray<200>,
25337}
25338impl PLAY_TUNE_DATA {
25339    pub const ENCODED_LEN: usize = 232usize;
25340    pub const DEFAULT: Self = Self {
25341        target_system: 0_u8,
25342        target_component: 0_u8,
25343        tune: CharArray::new([0_u8; 30usize]),
25344        tune2: CharArray::new([0_u8; 200usize]),
25345    };
25346    #[cfg(feature = "arbitrary")]
25347    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25348        use arbitrary::{Arbitrary, Unstructured};
25349        let mut buf = [0u8; 1024];
25350        rng.fill_bytes(&mut buf);
25351        let mut unstructured = Unstructured::new(&buf);
25352        Self::arbitrary(&mut unstructured).unwrap_or_default()
25353    }
25354}
25355impl Default for PLAY_TUNE_DATA {
25356    fn default() -> Self {
25357        Self::DEFAULT.clone()
25358    }
25359}
25360impl MessageData for PLAY_TUNE_DATA {
25361    type Message = MavMessage;
25362    const ID: u32 = 258u32;
25363    const NAME: &'static str = "PLAY_TUNE";
25364    const EXTRA_CRC: u8 = 187u8;
25365    const ENCODED_LEN: usize = 232usize;
25366    fn deser(
25367        _version: MavlinkVersion,
25368        __input: &[u8],
25369    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25370        let avail_len = __input.len();
25371        let mut payload_buf = [0; Self::ENCODED_LEN];
25372        let mut buf = if avail_len < Self::ENCODED_LEN {
25373            payload_buf[0..avail_len].copy_from_slice(__input);
25374            Bytes::new(&payload_buf)
25375        } else {
25376            Bytes::new(__input)
25377        };
25378        let mut __struct = Self::default();
25379        __struct.target_system = buf.get_u8();
25380        __struct.target_component = buf.get_u8();
25381        let mut tmp = [0_u8; 30usize];
25382        for v in &mut tmp {
25383            *v = buf.get_u8();
25384        }
25385        __struct.tune = CharArray::new(tmp);
25386        let mut tmp = [0_u8; 200usize];
25387        for v in &mut tmp {
25388            *v = buf.get_u8();
25389        }
25390        __struct.tune2 = CharArray::new(tmp);
25391        Ok(__struct)
25392    }
25393    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25394        let mut __tmp = BytesMut::new(bytes);
25395        #[allow(clippy::absurd_extreme_comparisons)]
25396        #[allow(unused_comparisons)]
25397        if __tmp.remaining() < Self::ENCODED_LEN {
25398            panic!(
25399                "buffer is too small (need {} bytes, but got {})",
25400                Self::ENCODED_LEN,
25401                __tmp.remaining(),
25402            )
25403        }
25404        __tmp.put_u8(self.target_system);
25405        __tmp.put_u8(self.target_component);
25406        for val in &self.tune {
25407            __tmp.put_u8(*val);
25408        }
25409        if matches!(version, MavlinkVersion::V2) {
25410            for val in &self.tune2 {
25411                __tmp.put_u8(*val);
25412            }
25413            let len = __tmp.len();
25414            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25415        } else {
25416            __tmp.len()
25417        }
25418    }
25419}
25420#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
25421#[doc = ""]
25422#[doc = "ID: 400"]
25423#[derive(Debug, Clone, PartialEq)]
25424#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25426#[cfg_attr(feature = "ts", derive(TS))]
25427#[cfg_attr(feature = "ts", ts(export))]
25428pub struct PLAY_TUNE_V2_DATA {
25429    #[doc = "Tune format"]
25430    pub format: TuneFormat,
25431    #[doc = "System ID"]
25432    pub target_system: u8,
25433    #[doc = "Component ID"]
25434    pub target_component: u8,
25435    #[doc = "Tune definition as a NULL-terminated string."]
25436    #[cfg_attr(feature = "ts", ts(type = "string"))]
25437    pub tune: CharArray<248>,
25438}
25439impl PLAY_TUNE_V2_DATA {
25440    pub const ENCODED_LEN: usize = 254usize;
25441    pub const DEFAULT: Self = Self {
25442        format: TuneFormat::DEFAULT,
25443        target_system: 0_u8,
25444        target_component: 0_u8,
25445        tune: CharArray::new([0_u8; 248usize]),
25446    };
25447    #[cfg(feature = "arbitrary")]
25448    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25449        use arbitrary::{Arbitrary, Unstructured};
25450        let mut buf = [0u8; 1024];
25451        rng.fill_bytes(&mut buf);
25452        let mut unstructured = Unstructured::new(&buf);
25453        Self::arbitrary(&mut unstructured).unwrap_or_default()
25454    }
25455}
25456impl Default for PLAY_TUNE_V2_DATA {
25457    fn default() -> Self {
25458        Self::DEFAULT.clone()
25459    }
25460}
25461impl MessageData for PLAY_TUNE_V2_DATA {
25462    type Message = MavMessage;
25463    const ID: u32 = 400u32;
25464    const NAME: &'static str = "PLAY_TUNE_V2";
25465    const EXTRA_CRC: u8 = 110u8;
25466    const ENCODED_LEN: usize = 254usize;
25467    fn deser(
25468        _version: MavlinkVersion,
25469        __input: &[u8],
25470    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25471        let avail_len = __input.len();
25472        let mut payload_buf = [0; Self::ENCODED_LEN];
25473        let mut buf = if avail_len < Self::ENCODED_LEN {
25474            payload_buf[0..avail_len].copy_from_slice(__input);
25475            Bytes::new(&payload_buf)
25476        } else {
25477            Bytes::new(__input)
25478        };
25479        let mut __struct = Self::default();
25480        let tmp = buf.get_u32_le();
25481        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
25482            ::mavlink_core::error::ParserError::InvalidEnum {
25483                enum_type: "TuneFormat",
25484                value: tmp as u64,
25485            },
25486        )?;
25487        __struct.target_system = buf.get_u8();
25488        __struct.target_component = buf.get_u8();
25489        let mut tmp = [0_u8; 248usize];
25490        for v in &mut tmp {
25491            *v = buf.get_u8();
25492        }
25493        __struct.tune = CharArray::new(tmp);
25494        Ok(__struct)
25495    }
25496    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25497        let mut __tmp = BytesMut::new(bytes);
25498        #[allow(clippy::absurd_extreme_comparisons)]
25499        #[allow(unused_comparisons)]
25500        if __tmp.remaining() < Self::ENCODED_LEN {
25501            panic!(
25502                "buffer is too small (need {} bytes, but got {})",
25503                Self::ENCODED_LEN,
25504                __tmp.remaining(),
25505            )
25506        }
25507        __tmp.put_u32_le(self.format as u32);
25508        __tmp.put_u8(self.target_system);
25509        __tmp.put_u8(self.target_component);
25510        for val in &self.tune {
25511            __tmp.put_u8(*val);
25512        }
25513        if matches!(version, MavlinkVersion::V2) {
25514            let len = __tmp.len();
25515            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25516        } else {
25517            __tmp.len()
25518        }
25519    }
25520}
25521#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
25522#[doc = ""]
25523#[doc = "ID: 87"]
25524#[derive(Debug, Clone, PartialEq)]
25525#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25526#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25527#[cfg_attr(feature = "ts", derive(TS))]
25528#[cfg_attr(feature = "ts", ts(export))]
25529pub struct POSITION_TARGET_GLOBAL_INT_DATA {
25530    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
25531    pub time_boot_ms: u32,
25532    #[doc = "Latitude in WGS84 frame"]
25533    pub lat_int: i32,
25534    #[doc = "Longitude in WGS84 frame"]
25535    pub lon_int: i32,
25536    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
25537    pub alt: f32,
25538    #[doc = "X velocity in NED frame"]
25539    pub vx: f32,
25540    #[doc = "Y velocity in NED frame"]
25541    pub vy: f32,
25542    #[doc = "Z velocity in NED frame"]
25543    pub vz: f32,
25544    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25545    pub afx: f32,
25546    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25547    pub afy: f32,
25548    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25549    pub afz: f32,
25550    #[doc = "yaw setpoint"]
25551    pub yaw: f32,
25552    #[doc = "yaw rate setpoint"]
25553    pub yaw_rate: f32,
25554    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25555    pub type_mask: PositionTargetTypemask,
25556    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
25557    pub coordinate_frame: MavFrame,
25558}
25559impl POSITION_TARGET_GLOBAL_INT_DATA {
25560    pub const ENCODED_LEN: usize = 51usize;
25561    pub const DEFAULT: Self = Self {
25562        time_boot_ms: 0_u32,
25563        lat_int: 0_i32,
25564        lon_int: 0_i32,
25565        alt: 0.0_f32,
25566        vx: 0.0_f32,
25567        vy: 0.0_f32,
25568        vz: 0.0_f32,
25569        afx: 0.0_f32,
25570        afy: 0.0_f32,
25571        afz: 0.0_f32,
25572        yaw: 0.0_f32,
25573        yaw_rate: 0.0_f32,
25574        type_mask: PositionTargetTypemask::DEFAULT,
25575        coordinate_frame: MavFrame::DEFAULT,
25576    };
25577    #[cfg(feature = "arbitrary")]
25578    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25579        use arbitrary::{Arbitrary, Unstructured};
25580        let mut buf = [0u8; 1024];
25581        rng.fill_bytes(&mut buf);
25582        let mut unstructured = Unstructured::new(&buf);
25583        Self::arbitrary(&mut unstructured).unwrap_or_default()
25584    }
25585}
25586impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
25587    fn default() -> Self {
25588        Self::DEFAULT.clone()
25589    }
25590}
25591impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
25592    type Message = MavMessage;
25593    const ID: u32 = 87u32;
25594    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
25595    const EXTRA_CRC: u8 = 150u8;
25596    const ENCODED_LEN: usize = 51usize;
25597    fn deser(
25598        _version: MavlinkVersion,
25599        __input: &[u8],
25600    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25601        let avail_len = __input.len();
25602        let mut payload_buf = [0; Self::ENCODED_LEN];
25603        let mut buf = if avail_len < Self::ENCODED_LEN {
25604            payload_buf[0..avail_len].copy_from_slice(__input);
25605            Bytes::new(&payload_buf)
25606        } else {
25607            Bytes::new(__input)
25608        };
25609        let mut __struct = Self::default();
25610        __struct.time_boot_ms = buf.get_u32_le();
25611        __struct.lat_int = buf.get_i32_le();
25612        __struct.lon_int = buf.get_i32_le();
25613        __struct.alt = buf.get_f32_le();
25614        __struct.vx = buf.get_f32_le();
25615        __struct.vy = buf.get_f32_le();
25616        __struct.vz = buf.get_f32_le();
25617        __struct.afx = buf.get_f32_le();
25618        __struct.afy = buf.get_f32_le();
25619        __struct.afz = buf.get_f32_le();
25620        __struct.yaw = buf.get_f32_le();
25621        __struct.yaw_rate = buf.get_f32_le();
25622        let tmp = buf.get_u16_le();
25623        __struct.type_mask =
25624            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
25625                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25626                    flag_type: "PositionTargetTypemask",
25627                    value: tmp as u64,
25628                })?;
25629        let tmp = buf.get_u8();
25630        __struct.coordinate_frame =
25631            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25632                enum_type: "MavFrame",
25633                value: tmp as u64,
25634            })?;
25635        Ok(__struct)
25636    }
25637    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25638        let mut __tmp = BytesMut::new(bytes);
25639        #[allow(clippy::absurd_extreme_comparisons)]
25640        #[allow(unused_comparisons)]
25641        if __tmp.remaining() < Self::ENCODED_LEN {
25642            panic!(
25643                "buffer is too small (need {} bytes, but got {})",
25644                Self::ENCODED_LEN,
25645                __tmp.remaining(),
25646            )
25647        }
25648        __tmp.put_u32_le(self.time_boot_ms);
25649        __tmp.put_i32_le(self.lat_int);
25650        __tmp.put_i32_le(self.lon_int);
25651        __tmp.put_f32_le(self.alt);
25652        __tmp.put_f32_le(self.vx);
25653        __tmp.put_f32_le(self.vy);
25654        __tmp.put_f32_le(self.vz);
25655        __tmp.put_f32_le(self.afx);
25656        __tmp.put_f32_le(self.afy);
25657        __tmp.put_f32_le(self.afz);
25658        __tmp.put_f32_le(self.yaw);
25659        __tmp.put_f32_le(self.yaw_rate);
25660        __tmp.put_u16_le(self.type_mask.bits() as u16);
25661        __tmp.put_u8(self.coordinate_frame as u8);
25662        if matches!(version, MavlinkVersion::V2) {
25663            let len = __tmp.len();
25664            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25665        } else {
25666            __tmp.len()
25667        }
25668    }
25669}
25670#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
25671#[doc = ""]
25672#[doc = "ID: 85"]
25673#[derive(Debug, Clone, PartialEq)]
25674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25676#[cfg_attr(feature = "ts", derive(TS))]
25677#[cfg_attr(feature = "ts", ts(export))]
25678pub struct POSITION_TARGET_LOCAL_NED_DATA {
25679    #[doc = "Timestamp (time since system boot)."]
25680    pub time_boot_ms: u32,
25681    #[doc = "X Position in NED frame"]
25682    pub x: f32,
25683    #[doc = "Y Position in NED frame"]
25684    pub y: f32,
25685    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
25686    pub z: f32,
25687    #[doc = "X velocity in NED frame"]
25688    pub vx: f32,
25689    #[doc = "Y velocity in NED frame"]
25690    pub vy: f32,
25691    #[doc = "Z velocity in NED frame"]
25692    pub vz: f32,
25693    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25694    pub afx: f32,
25695    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25696    pub afy: f32,
25697    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25698    pub afz: f32,
25699    #[doc = "yaw setpoint"]
25700    pub yaw: f32,
25701    #[doc = "yaw rate setpoint"]
25702    pub yaw_rate: f32,
25703    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25704    pub type_mask: PositionTargetTypemask,
25705    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
25706    pub coordinate_frame: MavFrame,
25707}
25708impl POSITION_TARGET_LOCAL_NED_DATA {
25709    pub const ENCODED_LEN: usize = 51usize;
25710    pub const DEFAULT: Self = Self {
25711        time_boot_ms: 0_u32,
25712        x: 0.0_f32,
25713        y: 0.0_f32,
25714        z: 0.0_f32,
25715        vx: 0.0_f32,
25716        vy: 0.0_f32,
25717        vz: 0.0_f32,
25718        afx: 0.0_f32,
25719        afy: 0.0_f32,
25720        afz: 0.0_f32,
25721        yaw: 0.0_f32,
25722        yaw_rate: 0.0_f32,
25723        type_mask: PositionTargetTypemask::DEFAULT,
25724        coordinate_frame: MavFrame::DEFAULT,
25725    };
25726    #[cfg(feature = "arbitrary")]
25727    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25728        use arbitrary::{Arbitrary, Unstructured};
25729        let mut buf = [0u8; 1024];
25730        rng.fill_bytes(&mut buf);
25731        let mut unstructured = Unstructured::new(&buf);
25732        Self::arbitrary(&mut unstructured).unwrap_or_default()
25733    }
25734}
25735impl Default for POSITION_TARGET_LOCAL_NED_DATA {
25736    fn default() -> Self {
25737        Self::DEFAULT.clone()
25738    }
25739}
25740impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
25741    type Message = MavMessage;
25742    const ID: u32 = 85u32;
25743    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
25744    const EXTRA_CRC: u8 = 140u8;
25745    const ENCODED_LEN: usize = 51usize;
25746    fn deser(
25747        _version: MavlinkVersion,
25748        __input: &[u8],
25749    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25750        let avail_len = __input.len();
25751        let mut payload_buf = [0; Self::ENCODED_LEN];
25752        let mut buf = if avail_len < Self::ENCODED_LEN {
25753            payload_buf[0..avail_len].copy_from_slice(__input);
25754            Bytes::new(&payload_buf)
25755        } else {
25756            Bytes::new(__input)
25757        };
25758        let mut __struct = Self::default();
25759        __struct.time_boot_ms = buf.get_u32_le();
25760        __struct.x = buf.get_f32_le();
25761        __struct.y = buf.get_f32_le();
25762        __struct.z = buf.get_f32_le();
25763        __struct.vx = buf.get_f32_le();
25764        __struct.vy = buf.get_f32_le();
25765        __struct.vz = buf.get_f32_le();
25766        __struct.afx = buf.get_f32_le();
25767        __struct.afy = buf.get_f32_le();
25768        __struct.afz = buf.get_f32_le();
25769        __struct.yaw = buf.get_f32_le();
25770        __struct.yaw_rate = buf.get_f32_le();
25771        let tmp = buf.get_u16_le();
25772        __struct.type_mask =
25773            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
25774                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25775                    flag_type: "PositionTargetTypemask",
25776                    value: tmp as u64,
25777                })?;
25778        let tmp = buf.get_u8();
25779        __struct.coordinate_frame =
25780            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25781                enum_type: "MavFrame",
25782                value: tmp as u64,
25783            })?;
25784        Ok(__struct)
25785    }
25786    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25787        let mut __tmp = BytesMut::new(bytes);
25788        #[allow(clippy::absurd_extreme_comparisons)]
25789        #[allow(unused_comparisons)]
25790        if __tmp.remaining() < Self::ENCODED_LEN {
25791            panic!(
25792                "buffer is too small (need {} bytes, but got {})",
25793                Self::ENCODED_LEN,
25794                __tmp.remaining(),
25795            )
25796        }
25797        __tmp.put_u32_le(self.time_boot_ms);
25798        __tmp.put_f32_le(self.x);
25799        __tmp.put_f32_le(self.y);
25800        __tmp.put_f32_le(self.z);
25801        __tmp.put_f32_le(self.vx);
25802        __tmp.put_f32_le(self.vy);
25803        __tmp.put_f32_le(self.vz);
25804        __tmp.put_f32_le(self.afx);
25805        __tmp.put_f32_le(self.afy);
25806        __tmp.put_f32_le(self.afz);
25807        __tmp.put_f32_le(self.yaw);
25808        __tmp.put_f32_le(self.yaw_rate);
25809        __tmp.put_u16_le(self.type_mask.bits() as u16);
25810        __tmp.put_u8(self.coordinate_frame as u8);
25811        if matches!(version, MavlinkVersion::V2) {
25812            let len = __tmp.len();
25813            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25814        } else {
25815            __tmp.len()
25816        }
25817    }
25818}
25819#[doc = "Power supply status."]
25820#[doc = ""]
25821#[doc = "ID: 125"]
25822#[derive(Debug, Clone, PartialEq)]
25823#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25824#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25825#[cfg_attr(feature = "ts", derive(TS))]
25826#[cfg_attr(feature = "ts", ts(export))]
25827pub struct POWER_STATUS_DATA {
25828    #[doc = "5V rail voltage."]
25829    pub Vcc: u16,
25830    #[doc = "Servo rail voltage."]
25831    pub Vservo: u16,
25832    #[doc = "Bitmap of power supply status flags."]
25833    pub flags: MavPowerStatus,
25834}
25835impl POWER_STATUS_DATA {
25836    pub const ENCODED_LEN: usize = 6usize;
25837    pub const DEFAULT: Self = Self {
25838        Vcc: 0_u16,
25839        Vservo: 0_u16,
25840        flags: MavPowerStatus::DEFAULT,
25841    };
25842    #[cfg(feature = "arbitrary")]
25843    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25844        use arbitrary::{Arbitrary, Unstructured};
25845        let mut buf = [0u8; 1024];
25846        rng.fill_bytes(&mut buf);
25847        let mut unstructured = Unstructured::new(&buf);
25848        Self::arbitrary(&mut unstructured).unwrap_or_default()
25849    }
25850}
25851impl Default for POWER_STATUS_DATA {
25852    fn default() -> Self {
25853        Self::DEFAULT.clone()
25854    }
25855}
25856impl MessageData for POWER_STATUS_DATA {
25857    type Message = MavMessage;
25858    const ID: u32 = 125u32;
25859    const NAME: &'static str = "POWER_STATUS";
25860    const EXTRA_CRC: u8 = 203u8;
25861    const ENCODED_LEN: usize = 6usize;
25862    fn deser(
25863        _version: MavlinkVersion,
25864        __input: &[u8],
25865    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25866        let avail_len = __input.len();
25867        let mut payload_buf = [0; Self::ENCODED_LEN];
25868        let mut buf = if avail_len < Self::ENCODED_LEN {
25869            payload_buf[0..avail_len].copy_from_slice(__input);
25870            Bytes::new(&payload_buf)
25871        } else {
25872            Bytes::new(__input)
25873        };
25874        let mut __struct = Self::default();
25875        __struct.Vcc = buf.get_u16_le();
25876        __struct.Vservo = buf.get_u16_le();
25877        let tmp = buf.get_u16_le();
25878        __struct.flags = MavPowerStatus::from_bits(tmp as <MavPowerStatus as Flags>::Bits).ok_or(
25879            ::mavlink_core::error::ParserError::InvalidFlag {
25880                flag_type: "MavPowerStatus",
25881                value: tmp as u64,
25882            },
25883        )?;
25884        Ok(__struct)
25885    }
25886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25887        let mut __tmp = BytesMut::new(bytes);
25888        #[allow(clippy::absurd_extreme_comparisons)]
25889        #[allow(unused_comparisons)]
25890        if __tmp.remaining() < Self::ENCODED_LEN {
25891            panic!(
25892                "buffer is too small (need {} bytes, but got {})",
25893                Self::ENCODED_LEN,
25894                __tmp.remaining(),
25895            )
25896        }
25897        __tmp.put_u16_le(self.Vcc);
25898        __tmp.put_u16_le(self.Vservo);
25899        __tmp.put_u16_le(self.flags.bits() as u16);
25900        if matches!(version, MavlinkVersion::V2) {
25901            let len = __tmp.len();
25902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25903        } else {
25904            __tmp.len()
25905        }
25906    }
25907}
25908#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
25909#[doc = ""]
25910#[doc = "ID: 300"]
25911#[derive(Debug, Clone, PartialEq)]
25912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25914#[cfg_attr(feature = "ts", derive(TS))]
25915#[cfg_attr(feature = "ts", ts(export))]
25916pub struct PROTOCOL_VERSION_DATA {
25917    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
25918    pub version: u16,
25919    #[doc = "Minimum MAVLink version supported"]
25920    pub min_version: u16,
25921    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
25922    pub max_version: u16,
25923    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25924    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25925    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25926    pub spec_version_hash: [u8; 8],
25927    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25928    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25929    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25930    pub library_version_hash: [u8; 8],
25931}
25932impl PROTOCOL_VERSION_DATA {
25933    pub const ENCODED_LEN: usize = 22usize;
25934    pub const DEFAULT: Self = Self {
25935        version: 0_u16,
25936        min_version: 0_u16,
25937        max_version: 0_u16,
25938        spec_version_hash: [0_u8; 8usize],
25939        library_version_hash: [0_u8; 8usize],
25940    };
25941    #[cfg(feature = "arbitrary")]
25942    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25943        use arbitrary::{Arbitrary, Unstructured};
25944        let mut buf = [0u8; 1024];
25945        rng.fill_bytes(&mut buf);
25946        let mut unstructured = Unstructured::new(&buf);
25947        Self::arbitrary(&mut unstructured).unwrap_or_default()
25948    }
25949}
25950impl Default for PROTOCOL_VERSION_DATA {
25951    fn default() -> Self {
25952        Self::DEFAULT.clone()
25953    }
25954}
25955impl MessageData for PROTOCOL_VERSION_DATA {
25956    type Message = MavMessage;
25957    const ID: u32 = 300u32;
25958    const NAME: &'static str = "PROTOCOL_VERSION";
25959    const EXTRA_CRC: u8 = 217u8;
25960    const ENCODED_LEN: usize = 22usize;
25961    fn deser(
25962        _version: MavlinkVersion,
25963        __input: &[u8],
25964    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25965        let avail_len = __input.len();
25966        let mut payload_buf = [0; Self::ENCODED_LEN];
25967        let mut buf = if avail_len < Self::ENCODED_LEN {
25968            payload_buf[0..avail_len].copy_from_slice(__input);
25969            Bytes::new(&payload_buf)
25970        } else {
25971            Bytes::new(__input)
25972        };
25973        let mut __struct = Self::default();
25974        __struct.version = buf.get_u16_le();
25975        __struct.min_version = buf.get_u16_le();
25976        __struct.max_version = buf.get_u16_le();
25977        for v in &mut __struct.spec_version_hash {
25978            let val = buf.get_u8();
25979            *v = val;
25980        }
25981        for v in &mut __struct.library_version_hash {
25982            let val = buf.get_u8();
25983            *v = val;
25984        }
25985        Ok(__struct)
25986    }
25987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25988        let mut __tmp = BytesMut::new(bytes);
25989        #[allow(clippy::absurd_extreme_comparisons)]
25990        #[allow(unused_comparisons)]
25991        if __tmp.remaining() < Self::ENCODED_LEN {
25992            panic!(
25993                "buffer is too small (need {} bytes, but got {})",
25994                Self::ENCODED_LEN,
25995                __tmp.remaining(),
25996            )
25997        }
25998        __tmp.put_u16_le(self.version);
25999        __tmp.put_u16_le(self.min_version);
26000        __tmp.put_u16_le(self.max_version);
26001        for val in &self.spec_version_hash {
26002            __tmp.put_u8(*val);
26003        }
26004        for val in &self.library_version_hash {
26005            __tmp.put_u8(*val);
26006        }
26007        if matches!(version, MavlinkVersion::V2) {
26008            let len = __tmp.len();
26009            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26010        } else {
26011            __tmp.len()
26012        }
26013    }
26014}
26015#[doc = "Status generated by radio and injected into MAVLink stream."]
26016#[doc = ""]
26017#[doc = "ID: 109"]
26018#[derive(Debug, Clone, PartialEq)]
26019#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26020#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26021#[cfg_attr(feature = "ts", derive(TS))]
26022#[cfg_attr(feature = "ts", ts(export))]
26023pub struct RADIO_STATUS_DATA {
26024    #[doc = "Count of radio packet receive errors (since boot)."]
26025    pub rxerrors: u16,
26026    #[doc = "Count of error corrected radio packets (since boot)."]
26027    pub fixed: u16,
26028    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26029    pub rssi: u8,
26030    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26031    pub remrssi: u8,
26032    #[doc = "Remaining free transmitter buffer space."]
26033    pub txbuf: u8,
26034    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
26035    pub noise: u8,
26036    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
26037    pub remnoise: u8,
26038}
26039impl RADIO_STATUS_DATA {
26040    pub const ENCODED_LEN: usize = 9usize;
26041    pub const DEFAULT: Self = Self {
26042        rxerrors: 0_u16,
26043        fixed: 0_u16,
26044        rssi: 0_u8,
26045        remrssi: 0_u8,
26046        txbuf: 0_u8,
26047        noise: 0_u8,
26048        remnoise: 0_u8,
26049    };
26050    #[cfg(feature = "arbitrary")]
26051    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26052        use arbitrary::{Arbitrary, Unstructured};
26053        let mut buf = [0u8; 1024];
26054        rng.fill_bytes(&mut buf);
26055        let mut unstructured = Unstructured::new(&buf);
26056        Self::arbitrary(&mut unstructured).unwrap_or_default()
26057    }
26058}
26059impl Default for RADIO_STATUS_DATA {
26060    fn default() -> Self {
26061        Self::DEFAULT.clone()
26062    }
26063}
26064impl MessageData for RADIO_STATUS_DATA {
26065    type Message = MavMessage;
26066    const ID: u32 = 109u32;
26067    const NAME: &'static str = "RADIO_STATUS";
26068    const EXTRA_CRC: u8 = 185u8;
26069    const ENCODED_LEN: usize = 9usize;
26070    fn deser(
26071        _version: MavlinkVersion,
26072        __input: &[u8],
26073    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26074        let avail_len = __input.len();
26075        let mut payload_buf = [0; Self::ENCODED_LEN];
26076        let mut buf = if avail_len < Self::ENCODED_LEN {
26077            payload_buf[0..avail_len].copy_from_slice(__input);
26078            Bytes::new(&payload_buf)
26079        } else {
26080            Bytes::new(__input)
26081        };
26082        let mut __struct = Self::default();
26083        __struct.rxerrors = buf.get_u16_le();
26084        __struct.fixed = buf.get_u16_le();
26085        __struct.rssi = buf.get_u8();
26086        __struct.remrssi = buf.get_u8();
26087        __struct.txbuf = buf.get_u8();
26088        __struct.noise = buf.get_u8();
26089        __struct.remnoise = buf.get_u8();
26090        Ok(__struct)
26091    }
26092    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26093        let mut __tmp = BytesMut::new(bytes);
26094        #[allow(clippy::absurd_extreme_comparisons)]
26095        #[allow(unused_comparisons)]
26096        if __tmp.remaining() < Self::ENCODED_LEN {
26097            panic!(
26098                "buffer is too small (need {} bytes, but got {})",
26099                Self::ENCODED_LEN,
26100                __tmp.remaining(),
26101            )
26102        }
26103        __tmp.put_u16_le(self.rxerrors);
26104        __tmp.put_u16_le(self.fixed);
26105        __tmp.put_u8(self.rssi);
26106        __tmp.put_u8(self.remrssi);
26107        __tmp.put_u8(self.txbuf);
26108        __tmp.put_u8(self.noise);
26109        __tmp.put_u8(self.remnoise);
26110        if matches!(version, MavlinkVersion::V2) {
26111            let len = __tmp.len();
26112            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26113        } else {
26114            __tmp.len()
26115        }
26116    }
26117}
26118#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
26119#[doc = ""]
26120#[doc = "ID: 27"]
26121#[derive(Debug, Clone, PartialEq)]
26122#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26123#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26124#[cfg_attr(feature = "ts", derive(TS))]
26125#[cfg_attr(feature = "ts", ts(export))]
26126pub struct RAW_IMU_DATA {
26127    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26128    pub time_usec: u64,
26129    #[doc = "X acceleration (raw)"]
26130    pub xacc: i16,
26131    #[doc = "Y acceleration (raw)"]
26132    pub yacc: i16,
26133    #[doc = "Z acceleration (raw)"]
26134    pub zacc: i16,
26135    #[doc = "Angular speed around X axis (raw)"]
26136    pub xgyro: i16,
26137    #[doc = "Angular speed around Y axis (raw)"]
26138    pub ygyro: i16,
26139    #[doc = "Angular speed around Z axis (raw)"]
26140    pub zgyro: i16,
26141    #[doc = "X Magnetic field (raw)"]
26142    pub xmag: i16,
26143    #[doc = "Y Magnetic field (raw)"]
26144    pub ymag: i16,
26145    #[doc = "Z Magnetic field (raw)"]
26146    pub zmag: i16,
26147    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
26148    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26149    pub id: u8,
26150    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26151    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26152    pub temperature: i16,
26153}
26154impl RAW_IMU_DATA {
26155    pub const ENCODED_LEN: usize = 29usize;
26156    pub const DEFAULT: Self = Self {
26157        time_usec: 0_u64,
26158        xacc: 0_i16,
26159        yacc: 0_i16,
26160        zacc: 0_i16,
26161        xgyro: 0_i16,
26162        ygyro: 0_i16,
26163        zgyro: 0_i16,
26164        xmag: 0_i16,
26165        ymag: 0_i16,
26166        zmag: 0_i16,
26167        id: 0_u8,
26168        temperature: 0_i16,
26169    };
26170    #[cfg(feature = "arbitrary")]
26171    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26172        use arbitrary::{Arbitrary, Unstructured};
26173        let mut buf = [0u8; 1024];
26174        rng.fill_bytes(&mut buf);
26175        let mut unstructured = Unstructured::new(&buf);
26176        Self::arbitrary(&mut unstructured).unwrap_or_default()
26177    }
26178}
26179impl Default for RAW_IMU_DATA {
26180    fn default() -> Self {
26181        Self::DEFAULT.clone()
26182    }
26183}
26184impl MessageData for RAW_IMU_DATA {
26185    type Message = MavMessage;
26186    const ID: u32 = 27u32;
26187    const NAME: &'static str = "RAW_IMU";
26188    const EXTRA_CRC: u8 = 144u8;
26189    const ENCODED_LEN: usize = 29usize;
26190    fn deser(
26191        _version: MavlinkVersion,
26192        __input: &[u8],
26193    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26194        let avail_len = __input.len();
26195        let mut payload_buf = [0; Self::ENCODED_LEN];
26196        let mut buf = if avail_len < Self::ENCODED_LEN {
26197            payload_buf[0..avail_len].copy_from_slice(__input);
26198            Bytes::new(&payload_buf)
26199        } else {
26200            Bytes::new(__input)
26201        };
26202        let mut __struct = Self::default();
26203        __struct.time_usec = buf.get_u64_le();
26204        __struct.xacc = buf.get_i16_le();
26205        __struct.yacc = buf.get_i16_le();
26206        __struct.zacc = buf.get_i16_le();
26207        __struct.xgyro = buf.get_i16_le();
26208        __struct.ygyro = buf.get_i16_le();
26209        __struct.zgyro = buf.get_i16_le();
26210        __struct.xmag = buf.get_i16_le();
26211        __struct.ymag = buf.get_i16_le();
26212        __struct.zmag = buf.get_i16_le();
26213        __struct.id = buf.get_u8();
26214        __struct.temperature = buf.get_i16_le();
26215        Ok(__struct)
26216    }
26217    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26218        let mut __tmp = BytesMut::new(bytes);
26219        #[allow(clippy::absurd_extreme_comparisons)]
26220        #[allow(unused_comparisons)]
26221        if __tmp.remaining() < Self::ENCODED_LEN {
26222            panic!(
26223                "buffer is too small (need {} bytes, but got {})",
26224                Self::ENCODED_LEN,
26225                __tmp.remaining(),
26226            )
26227        }
26228        __tmp.put_u64_le(self.time_usec);
26229        __tmp.put_i16_le(self.xacc);
26230        __tmp.put_i16_le(self.yacc);
26231        __tmp.put_i16_le(self.zacc);
26232        __tmp.put_i16_le(self.xgyro);
26233        __tmp.put_i16_le(self.ygyro);
26234        __tmp.put_i16_le(self.zgyro);
26235        __tmp.put_i16_le(self.xmag);
26236        __tmp.put_i16_le(self.ymag);
26237        __tmp.put_i16_le(self.zmag);
26238        if matches!(version, MavlinkVersion::V2) {
26239            __tmp.put_u8(self.id);
26240            __tmp.put_i16_le(self.temperature);
26241            let len = __tmp.len();
26242            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26243        } else {
26244            __tmp.len()
26245        }
26246    }
26247}
26248#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
26249#[doc = ""]
26250#[doc = "ID: 28"]
26251#[derive(Debug, Clone, PartialEq)]
26252#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26253#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26254#[cfg_attr(feature = "ts", derive(TS))]
26255#[cfg_attr(feature = "ts", ts(export))]
26256pub struct RAW_PRESSURE_DATA {
26257    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26258    pub time_usec: u64,
26259    #[doc = "Absolute pressure (raw)"]
26260    pub press_abs: i16,
26261    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
26262    pub press_diff1: i16,
26263    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
26264    pub press_diff2: i16,
26265    #[doc = "Raw Temperature measurement (raw)"]
26266    pub temperature: i16,
26267}
26268impl RAW_PRESSURE_DATA {
26269    pub const ENCODED_LEN: usize = 16usize;
26270    pub const DEFAULT: Self = Self {
26271        time_usec: 0_u64,
26272        press_abs: 0_i16,
26273        press_diff1: 0_i16,
26274        press_diff2: 0_i16,
26275        temperature: 0_i16,
26276    };
26277    #[cfg(feature = "arbitrary")]
26278    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26279        use arbitrary::{Arbitrary, Unstructured};
26280        let mut buf = [0u8; 1024];
26281        rng.fill_bytes(&mut buf);
26282        let mut unstructured = Unstructured::new(&buf);
26283        Self::arbitrary(&mut unstructured).unwrap_or_default()
26284    }
26285}
26286impl Default for RAW_PRESSURE_DATA {
26287    fn default() -> Self {
26288        Self::DEFAULT.clone()
26289    }
26290}
26291impl MessageData for RAW_PRESSURE_DATA {
26292    type Message = MavMessage;
26293    const ID: u32 = 28u32;
26294    const NAME: &'static str = "RAW_PRESSURE";
26295    const EXTRA_CRC: u8 = 67u8;
26296    const ENCODED_LEN: usize = 16usize;
26297    fn deser(
26298        _version: MavlinkVersion,
26299        __input: &[u8],
26300    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26301        let avail_len = __input.len();
26302        let mut payload_buf = [0; Self::ENCODED_LEN];
26303        let mut buf = if avail_len < Self::ENCODED_LEN {
26304            payload_buf[0..avail_len].copy_from_slice(__input);
26305            Bytes::new(&payload_buf)
26306        } else {
26307            Bytes::new(__input)
26308        };
26309        let mut __struct = Self::default();
26310        __struct.time_usec = buf.get_u64_le();
26311        __struct.press_abs = buf.get_i16_le();
26312        __struct.press_diff1 = buf.get_i16_le();
26313        __struct.press_diff2 = buf.get_i16_le();
26314        __struct.temperature = buf.get_i16_le();
26315        Ok(__struct)
26316    }
26317    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26318        let mut __tmp = BytesMut::new(bytes);
26319        #[allow(clippy::absurd_extreme_comparisons)]
26320        #[allow(unused_comparisons)]
26321        if __tmp.remaining() < Self::ENCODED_LEN {
26322            panic!(
26323                "buffer is too small (need {} bytes, but got {})",
26324                Self::ENCODED_LEN,
26325                __tmp.remaining(),
26326            )
26327        }
26328        __tmp.put_u64_le(self.time_usec);
26329        __tmp.put_i16_le(self.press_abs);
26330        __tmp.put_i16_le(self.press_diff1);
26331        __tmp.put_i16_le(self.press_diff2);
26332        __tmp.put_i16_le(self.temperature);
26333        if matches!(version, MavlinkVersion::V2) {
26334            let len = __tmp.len();
26335            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26336        } else {
26337            __tmp.len()
26338        }
26339    }
26340}
26341#[doc = "RPM sensor data message."]
26342#[doc = ""]
26343#[doc = "ID: 339"]
26344#[derive(Debug, Clone, PartialEq)]
26345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26347#[cfg_attr(feature = "ts", derive(TS))]
26348#[cfg_attr(feature = "ts", ts(export))]
26349pub struct RAW_RPM_DATA {
26350    #[doc = "Indicated rate"]
26351    pub frequency: f32,
26352    #[doc = "Index of this RPM sensor (0-indexed)"]
26353    pub index: u8,
26354}
26355impl RAW_RPM_DATA {
26356    pub const ENCODED_LEN: usize = 5usize;
26357    pub const DEFAULT: Self = Self {
26358        frequency: 0.0_f32,
26359        index: 0_u8,
26360    };
26361    #[cfg(feature = "arbitrary")]
26362    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26363        use arbitrary::{Arbitrary, Unstructured};
26364        let mut buf = [0u8; 1024];
26365        rng.fill_bytes(&mut buf);
26366        let mut unstructured = Unstructured::new(&buf);
26367        Self::arbitrary(&mut unstructured).unwrap_or_default()
26368    }
26369}
26370impl Default for RAW_RPM_DATA {
26371    fn default() -> Self {
26372        Self::DEFAULT.clone()
26373    }
26374}
26375impl MessageData for RAW_RPM_DATA {
26376    type Message = MavMessage;
26377    const ID: u32 = 339u32;
26378    const NAME: &'static str = "RAW_RPM";
26379    const EXTRA_CRC: u8 = 199u8;
26380    const ENCODED_LEN: usize = 5usize;
26381    fn deser(
26382        _version: MavlinkVersion,
26383        __input: &[u8],
26384    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26385        let avail_len = __input.len();
26386        let mut payload_buf = [0; Self::ENCODED_LEN];
26387        let mut buf = if avail_len < Self::ENCODED_LEN {
26388            payload_buf[0..avail_len].copy_from_slice(__input);
26389            Bytes::new(&payload_buf)
26390        } else {
26391            Bytes::new(__input)
26392        };
26393        let mut __struct = Self::default();
26394        __struct.frequency = buf.get_f32_le();
26395        __struct.index = buf.get_u8();
26396        Ok(__struct)
26397    }
26398    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26399        let mut __tmp = BytesMut::new(bytes);
26400        #[allow(clippy::absurd_extreme_comparisons)]
26401        #[allow(unused_comparisons)]
26402        if __tmp.remaining() < Self::ENCODED_LEN {
26403            panic!(
26404                "buffer is too small (need {} bytes, but got {})",
26405                Self::ENCODED_LEN,
26406                __tmp.remaining(),
26407            )
26408        }
26409        __tmp.put_f32_le(self.frequency);
26410        __tmp.put_u8(self.index);
26411        if matches!(version, MavlinkVersion::V2) {
26412            let len = __tmp.len();
26413            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26414        } else {
26415            __tmp.len()
26416        }
26417    }
26418}
26419#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26420#[doc = ""]
26421#[doc = "ID: 65"]
26422#[derive(Debug, Clone, PartialEq)]
26423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26424#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26425#[cfg_attr(feature = "ts", derive(TS))]
26426#[cfg_attr(feature = "ts", ts(export))]
26427pub struct RC_CHANNELS_DATA {
26428    #[doc = "Timestamp (time since system boot)."]
26429    pub time_boot_ms: u32,
26430    #[doc = "RC channel 1 value."]
26431    pub chan1_raw: u16,
26432    #[doc = "RC channel 2 value."]
26433    pub chan2_raw: u16,
26434    #[doc = "RC channel 3 value."]
26435    pub chan3_raw: u16,
26436    #[doc = "RC channel 4 value."]
26437    pub chan4_raw: u16,
26438    #[doc = "RC channel 5 value."]
26439    pub chan5_raw: u16,
26440    #[doc = "RC channel 6 value."]
26441    pub chan6_raw: u16,
26442    #[doc = "RC channel 7 value."]
26443    pub chan7_raw: u16,
26444    #[doc = "RC channel 8 value."]
26445    pub chan8_raw: u16,
26446    #[doc = "RC channel 9 value."]
26447    pub chan9_raw: u16,
26448    #[doc = "RC channel 10 value."]
26449    pub chan10_raw: u16,
26450    #[doc = "RC channel 11 value."]
26451    pub chan11_raw: u16,
26452    #[doc = "RC channel 12 value."]
26453    pub chan12_raw: u16,
26454    #[doc = "RC channel 13 value."]
26455    pub chan13_raw: u16,
26456    #[doc = "RC channel 14 value."]
26457    pub chan14_raw: u16,
26458    #[doc = "RC channel 15 value."]
26459    pub chan15_raw: u16,
26460    #[doc = "RC channel 16 value."]
26461    pub chan16_raw: u16,
26462    #[doc = "RC channel 17 value."]
26463    pub chan17_raw: u16,
26464    #[doc = "RC channel 18 value."]
26465    pub chan18_raw: u16,
26466    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
26467    pub chancount: u8,
26468    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26469    pub rssi: u8,
26470}
26471impl RC_CHANNELS_DATA {
26472    pub const ENCODED_LEN: usize = 42usize;
26473    pub const DEFAULT: Self = Self {
26474        time_boot_ms: 0_u32,
26475        chan1_raw: 0_u16,
26476        chan2_raw: 0_u16,
26477        chan3_raw: 0_u16,
26478        chan4_raw: 0_u16,
26479        chan5_raw: 0_u16,
26480        chan6_raw: 0_u16,
26481        chan7_raw: 0_u16,
26482        chan8_raw: 0_u16,
26483        chan9_raw: 0_u16,
26484        chan10_raw: 0_u16,
26485        chan11_raw: 0_u16,
26486        chan12_raw: 0_u16,
26487        chan13_raw: 0_u16,
26488        chan14_raw: 0_u16,
26489        chan15_raw: 0_u16,
26490        chan16_raw: 0_u16,
26491        chan17_raw: 0_u16,
26492        chan18_raw: 0_u16,
26493        chancount: 0_u8,
26494        rssi: 0_u8,
26495    };
26496    #[cfg(feature = "arbitrary")]
26497    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26498        use arbitrary::{Arbitrary, Unstructured};
26499        let mut buf = [0u8; 1024];
26500        rng.fill_bytes(&mut buf);
26501        let mut unstructured = Unstructured::new(&buf);
26502        Self::arbitrary(&mut unstructured).unwrap_or_default()
26503    }
26504}
26505impl Default for RC_CHANNELS_DATA {
26506    fn default() -> Self {
26507        Self::DEFAULT.clone()
26508    }
26509}
26510impl MessageData for RC_CHANNELS_DATA {
26511    type Message = MavMessage;
26512    const ID: u32 = 65u32;
26513    const NAME: &'static str = "RC_CHANNELS";
26514    const EXTRA_CRC: u8 = 118u8;
26515    const ENCODED_LEN: usize = 42usize;
26516    fn deser(
26517        _version: MavlinkVersion,
26518        __input: &[u8],
26519    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26520        let avail_len = __input.len();
26521        let mut payload_buf = [0; Self::ENCODED_LEN];
26522        let mut buf = if avail_len < Self::ENCODED_LEN {
26523            payload_buf[0..avail_len].copy_from_slice(__input);
26524            Bytes::new(&payload_buf)
26525        } else {
26526            Bytes::new(__input)
26527        };
26528        let mut __struct = Self::default();
26529        __struct.time_boot_ms = buf.get_u32_le();
26530        __struct.chan1_raw = buf.get_u16_le();
26531        __struct.chan2_raw = buf.get_u16_le();
26532        __struct.chan3_raw = buf.get_u16_le();
26533        __struct.chan4_raw = buf.get_u16_le();
26534        __struct.chan5_raw = buf.get_u16_le();
26535        __struct.chan6_raw = buf.get_u16_le();
26536        __struct.chan7_raw = buf.get_u16_le();
26537        __struct.chan8_raw = buf.get_u16_le();
26538        __struct.chan9_raw = buf.get_u16_le();
26539        __struct.chan10_raw = buf.get_u16_le();
26540        __struct.chan11_raw = buf.get_u16_le();
26541        __struct.chan12_raw = buf.get_u16_le();
26542        __struct.chan13_raw = buf.get_u16_le();
26543        __struct.chan14_raw = buf.get_u16_le();
26544        __struct.chan15_raw = buf.get_u16_le();
26545        __struct.chan16_raw = buf.get_u16_le();
26546        __struct.chan17_raw = buf.get_u16_le();
26547        __struct.chan18_raw = buf.get_u16_le();
26548        __struct.chancount = buf.get_u8();
26549        __struct.rssi = buf.get_u8();
26550        Ok(__struct)
26551    }
26552    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26553        let mut __tmp = BytesMut::new(bytes);
26554        #[allow(clippy::absurd_extreme_comparisons)]
26555        #[allow(unused_comparisons)]
26556        if __tmp.remaining() < Self::ENCODED_LEN {
26557            panic!(
26558                "buffer is too small (need {} bytes, but got {})",
26559                Self::ENCODED_LEN,
26560                __tmp.remaining(),
26561            )
26562        }
26563        __tmp.put_u32_le(self.time_boot_ms);
26564        __tmp.put_u16_le(self.chan1_raw);
26565        __tmp.put_u16_le(self.chan2_raw);
26566        __tmp.put_u16_le(self.chan3_raw);
26567        __tmp.put_u16_le(self.chan4_raw);
26568        __tmp.put_u16_le(self.chan5_raw);
26569        __tmp.put_u16_le(self.chan6_raw);
26570        __tmp.put_u16_le(self.chan7_raw);
26571        __tmp.put_u16_le(self.chan8_raw);
26572        __tmp.put_u16_le(self.chan9_raw);
26573        __tmp.put_u16_le(self.chan10_raw);
26574        __tmp.put_u16_le(self.chan11_raw);
26575        __tmp.put_u16_le(self.chan12_raw);
26576        __tmp.put_u16_le(self.chan13_raw);
26577        __tmp.put_u16_le(self.chan14_raw);
26578        __tmp.put_u16_le(self.chan15_raw);
26579        __tmp.put_u16_le(self.chan16_raw);
26580        __tmp.put_u16_le(self.chan17_raw);
26581        __tmp.put_u16_le(self.chan18_raw);
26582        __tmp.put_u8(self.chancount);
26583        __tmp.put_u8(self.rssi);
26584        if matches!(version, MavlinkVersion::V2) {
26585            let len = __tmp.len();
26586            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26587        } else {
26588            __tmp.len()
26589        }
26590    }
26591}
26592#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
26593#[doc = ""]
26594#[doc = "ID: 70"]
26595#[derive(Debug, Clone, PartialEq)]
26596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26597#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26598#[cfg_attr(feature = "ts", derive(TS))]
26599#[cfg_attr(feature = "ts", ts(export))]
26600pub struct RC_CHANNELS_OVERRIDE_DATA {
26601    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26602    pub chan1_raw: u16,
26603    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26604    pub chan2_raw: u16,
26605    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26606    pub chan3_raw: u16,
26607    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26608    pub chan4_raw: u16,
26609    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26610    pub chan5_raw: u16,
26611    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26612    pub chan6_raw: u16,
26613    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26614    pub chan7_raw: u16,
26615    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26616    pub chan8_raw: u16,
26617    #[doc = "System ID"]
26618    pub target_system: u8,
26619    #[doc = "Component ID"]
26620    pub target_component: u8,
26621    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26622    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26623    pub chan9_raw: u16,
26624    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26625    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26626    pub chan10_raw: u16,
26627    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26628    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26629    pub chan11_raw: u16,
26630    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26631    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26632    pub chan12_raw: u16,
26633    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26634    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26635    pub chan13_raw: u16,
26636    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26637    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26638    pub chan14_raw: u16,
26639    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26640    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26641    pub chan15_raw: u16,
26642    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26643    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26644    pub chan16_raw: u16,
26645    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26646    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26647    pub chan17_raw: u16,
26648    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26649    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26650    pub chan18_raw: u16,
26651}
26652impl RC_CHANNELS_OVERRIDE_DATA {
26653    pub const ENCODED_LEN: usize = 38usize;
26654    pub const DEFAULT: Self = Self {
26655        chan1_raw: 0_u16,
26656        chan2_raw: 0_u16,
26657        chan3_raw: 0_u16,
26658        chan4_raw: 0_u16,
26659        chan5_raw: 0_u16,
26660        chan6_raw: 0_u16,
26661        chan7_raw: 0_u16,
26662        chan8_raw: 0_u16,
26663        target_system: 0_u8,
26664        target_component: 0_u8,
26665        chan9_raw: 0_u16,
26666        chan10_raw: 0_u16,
26667        chan11_raw: 0_u16,
26668        chan12_raw: 0_u16,
26669        chan13_raw: 0_u16,
26670        chan14_raw: 0_u16,
26671        chan15_raw: 0_u16,
26672        chan16_raw: 0_u16,
26673        chan17_raw: 0_u16,
26674        chan18_raw: 0_u16,
26675    };
26676    #[cfg(feature = "arbitrary")]
26677    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26678        use arbitrary::{Arbitrary, Unstructured};
26679        let mut buf = [0u8; 1024];
26680        rng.fill_bytes(&mut buf);
26681        let mut unstructured = Unstructured::new(&buf);
26682        Self::arbitrary(&mut unstructured).unwrap_or_default()
26683    }
26684}
26685impl Default for RC_CHANNELS_OVERRIDE_DATA {
26686    fn default() -> Self {
26687        Self::DEFAULT.clone()
26688    }
26689}
26690impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
26691    type Message = MavMessage;
26692    const ID: u32 = 70u32;
26693    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
26694    const EXTRA_CRC: u8 = 124u8;
26695    const ENCODED_LEN: usize = 38usize;
26696    fn deser(
26697        _version: MavlinkVersion,
26698        __input: &[u8],
26699    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26700        let avail_len = __input.len();
26701        let mut payload_buf = [0; Self::ENCODED_LEN];
26702        let mut buf = if avail_len < Self::ENCODED_LEN {
26703            payload_buf[0..avail_len].copy_from_slice(__input);
26704            Bytes::new(&payload_buf)
26705        } else {
26706            Bytes::new(__input)
26707        };
26708        let mut __struct = Self::default();
26709        __struct.chan1_raw = buf.get_u16_le();
26710        __struct.chan2_raw = buf.get_u16_le();
26711        __struct.chan3_raw = buf.get_u16_le();
26712        __struct.chan4_raw = buf.get_u16_le();
26713        __struct.chan5_raw = buf.get_u16_le();
26714        __struct.chan6_raw = buf.get_u16_le();
26715        __struct.chan7_raw = buf.get_u16_le();
26716        __struct.chan8_raw = buf.get_u16_le();
26717        __struct.target_system = buf.get_u8();
26718        __struct.target_component = buf.get_u8();
26719        __struct.chan9_raw = buf.get_u16_le();
26720        __struct.chan10_raw = buf.get_u16_le();
26721        __struct.chan11_raw = buf.get_u16_le();
26722        __struct.chan12_raw = buf.get_u16_le();
26723        __struct.chan13_raw = buf.get_u16_le();
26724        __struct.chan14_raw = buf.get_u16_le();
26725        __struct.chan15_raw = buf.get_u16_le();
26726        __struct.chan16_raw = buf.get_u16_le();
26727        __struct.chan17_raw = buf.get_u16_le();
26728        __struct.chan18_raw = buf.get_u16_le();
26729        Ok(__struct)
26730    }
26731    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26732        let mut __tmp = BytesMut::new(bytes);
26733        #[allow(clippy::absurd_extreme_comparisons)]
26734        #[allow(unused_comparisons)]
26735        if __tmp.remaining() < Self::ENCODED_LEN {
26736            panic!(
26737                "buffer is too small (need {} bytes, but got {})",
26738                Self::ENCODED_LEN,
26739                __tmp.remaining(),
26740            )
26741        }
26742        __tmp.put_u16_le(self.chan1_raw);
26743        __tmp.put_u16_le(self.chan2_raw);
26744        __tmp.put_u16_le(self.chan3_raw);
26745        __tmp.put_u16_le(self.chan4_raw);
26746        __tmp.put_u16_le(self.chan5_raw);
26747        __tmp.put_u16_le(self.chan6_raw);
26748        __tmp.put_u16_le(self.chan7_raw);
26749        __tmp.put_u16_le(self.chan8_raw);
26750        __tmp.put_u8(self.target_system);
26751        __tmp.put_u8(self.target_component);
26752        if matches!(version, MavlinkVersion::V2) {
26753            __tmp.put_u16_le(self.chan9_raw);
26754            __tmp.put_u16_le(self.chan10_raw);
26755            __tmp.put_u16_le(self.chan11_raw);
26756            __tmp.put_u16_le(self.chan12_raw);
26757            __tmp.put_u16_le(self.chan13_raw);
26758            __tmp.put_u16_le(self.chan14_raw);
26759            __tmp.put_u16_le(self.chan15_raw);
26760            __tmp.put_u16_le(self.chan16_raw);
26761            __tmp.put_u16_le(self.chan17_raw);
26762            __tmp.put_u16_le(self.chan18_raw);
26763            let len = __tmp.len();
26764            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26765        } else {
26766            __tmp.len()
26767        }
26768    }
26769}
26770#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26771#[doc = ""]
26772#[doc = "ID: 35"]
26773#[derive(Debug, Clone, PartialEq)]
26774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26776#[cfg_attr(feature = "ts", derive(TS))]
26777#[cfg_attr(feature = "ts", ts(export))]
26778pub struct RC_CHANNELS_RAW_DATA {
26779    #[doc = "Timestamp (time since system boot)."]
26780    pub time_boot_ms: u32,
26781    #[doc = "RC channel 1 value."]
26782    pub chan1_raw: u16,
26783    #[doc = "RC channel 2 value."]
26784    pub chan2_raw: u16,
26785    #[doc = "RC channel 3 value."]
26786    pub chan3_raw: u16,
26787    #[doc = "RC channel 4 value."]
26788    pub chan4_raw: u16,
26789    #[doc = "RC channel 5 value."]
26790    pub chan5_raw: u16,
26791    #[doc = "RC channel 6 value."]
26792    pub chan6_raw: u16,
26793    #[doc = "RC channel 7 value."]
26794    pub chan7_raw: u16,
26795    #[doc = "RC channel 8 value."]
26796    pub chan8_raw: u16,
26797    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26798    pub port: u8,
26799    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26800    pub rssi: u8,
26801}
26802impl RC_CHANNELS_RAW_DATA {
26803    pub const ENCODED_LEN: usize = 22usize;
26804    pub const DEFAULT: Self = Self {
26805        time_boot_ms: 0_u32,
26806        chan1_raw: 0_u16,
26807        chan2_raw: 0_u16,
26808        chan3_raw: 0_u16,
26809        chan4_raw: 0_u16,
26810        chan5_raw: 0_u16,
26811        chan6_raw: 0_u16,
26812        chan7_raw: 0_u16,
26813        chan8_raw: 0_u16,
26814        port: 0_u8,
26815        rssi: 0_u8,
26816    };
26817    #[cfg(feature = "arbitrary")]
26818    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26819        use arbitrary::{Arbitrary, Unstructured};
26820        let mut buf = [0u8; 1024];
26821        rng.fill_bytes(&mut buf);
26822        let mut unstructured = Unstructured::new(&buf);
26823        Self::arbitrary(&mut unstructured).unwrap_or_default()
26824    }
26825}
26826impl Default for RC_CHANNELS_RAW_DATA {
26827    fn default() -> Self {
26828        Self::DEFAULT.clone()
26829    }
26830}
26831impl MessageData for RC_CHANNELS_RAW_DATA {
26832    type Message = MavMessage;
26833    const ID: u32 = 35u32;
26834    const NAME: &'static str = "RC_CHANNELS_RAW";
26835    const EXTRA_CRC: u8 = 244u8;
26836    const ENCODED_LEN: usize = 22usize;
26837    fn deser(
26838        _version: MavlinkVersion,
26839        __input: &[u8],
26840    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26841        let avail_len = __input.len();
26842        let mut payload_buf = [0; Self::ENCODED_LEN];
26843        let mut buf = if avail_len < Self::ENCODED_LEN {
26844            payload_buf[0..avail_len].copy_from_slice(__input);
26845            Bytes::new(&payload_buf)
26846        } else {
26847            Bytes::new(__input)
26848        };
26849        let mut __struct = Self::default();
26850        __struct.time_boot_ms = buf.get_u32_le();
26851        __struct.chan1_raw = buf.get_u16_le();
26852        __struct.chan2_raw = buf.get_u16_le();
26853        __struct.chan3_raw = buf.get_u16_le();
26854        __struct.chan4_raw = buf.get_u16_le();
26855        __struct.chan5_raw = buf.get_u16_le();
26856        __struct.chan6_raw = buf.get_u16_le();
26857        __struct.chan7_raw = buf.get_u16_le();
26858        __struct.chan8_raw = buf.get_u16_le();
26859        __struct.port = buf.get_u8();
26860        __struct.rssi = buf.get_u8();
26861        Ok(__struct)
26862    }
26863    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26864        let mut __tmp = BytesMut::new(bytes);
26865        #[allow(clippy::absurd_extreme_comparisons)]
26866        #[allow(unused_comparisons)]
26867        if __tmp.remaining() < Self::ENCODED_LEN {
26868            panic!(
26869                "buffer is too small (need {} bytes, but got {})",
26870                Self::ENCODED_LEN,
26871                __tmp.remaining(),
26872            )
26873        }
26874        __tmp.put_u32_le(self.time_boot_ms);
26875        __tmp.put_u16_le(self.chan1_raw);
26876        __tmp.put_u16_le(self.chan2_raw);
26877        __tmp.put_u16_le(self.chan3_raw);
26878        __tmp.put_u16_le(self.chan4_raw);
26879        __tmp.put_u16_le(self.chan5_raw);
26880        __tmp.put_u16_le(self.chan6_raw);
26881        __tmp.put_u16_le(self.chan7_raw);
26882        __tmp.put_u16_le(self.chan8_raw);
26883        __tmp.put_u8(self.port);
26884        __tmp.put_u8(self.rssi);
26885        if matches!(version, MavlinkVersion::V2) {
26886            let len = __tmp.len();
26887            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26888        } else {
26889            __tmp.len()
26890        }
26891    }
26892}
26893#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
26894#[doc = ""]
26895#[doc = "ID: 34"]
26896#[derive(Debug, Clone, PartialEq)]
26897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26899#[cfg_attr(feature = "ts", derive(TS))]
26900#[cfg_attr(feature = "ts", ts(export))]
26901pub struct RC_CHANNELS_SCALED_DATA {
26902    #[doc = "Timestamp (time since system boot)."]
26903    pub time_boot_ms: u32,
26904    #[doc = "RC channel 1 value scaled."]
26905    pub chan1_scaled: i16,
26906    #[doc = "RC channel 2 value scaled."]
26907    pub chan2_scaled: i16,
26908    #[doc = "RC channel 3 value scaled."]
26909    pub chan3_scaled: i16,
26910    #[doc = "RC channel 4 value scaled."]
26911    pub chan4_scaled: i16,
26912    #[doc = "RC channel 5 value scaled."]
26913    pub chan5_scaled: i16,
26914    #[doc = "RC channel 6 value scaled."]
26915    pub chan6_scaled: i16,
26916    #[doc = "RC channel 7 value scaled."]
26917    pub chan7_scaled: i16,
26918    #[doc = "RC channel 8 value scaled."]
26919    pub chan8_scaled: i16,
26920    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26921    pub port: u8,
26922    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26923    pub rssi: u8,
26924}
26925impl RC_CHANNELS_SCALED_DATA {
26926    pub const ENCODED_LEN: usize = 22usize;
26927    pub const DEFAULT: Self = Self {
26928        time_boot_ms: 0_u32,
26929        chan1_scaled: 0_i16,
26930        chan2_scaled: 0_i16,
26931        chan3_scaled: 0_i16,
26932        chan4_scaled: 0_i16,
26933        chan5_scaled: 0_i16,
26934        chan6_scaled: 0_i16,
26935        chan7_scaled: 0_i16,
26936        chan8_scaled: 0_i16,
26937        port: 0_u8,
26938        rssi: 0_u8,
26939    };
26940    #[cfg(feature = "arbitrary")]
26941    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26942        use arbitrary::{Arbitrary, Unstructured};
26943        let mut buf = [0u8; 1024];
26944        rng.fill_bytes(&mut buf);
26945        let mut unstructured = Unstructured::new(&buf);
26946        Self::arbitrary(&mut unstructured).unwrap_or_default()
26947    }
26948}
26949impl Default for RC_CHANNELS_SCALED_DATA {
26950    fn default() -> Self {
26951        Self::DEFAULT.clone()
26952    }
26953}
26954impl MessageData for RC_CHANNELS_SCALED_DATA {
26955    type Message = MavMessage;
26956    const ID: u32 = 34u32;
26957    const NAME: &'static str = "RC_CHANNELS_SCALED";
26958    const EXTRA_CRC: u8 = 237u8;
26959    const ENCODED_LEN: usize = 22usize;
26960    fn deser(
26961        _version: MavlinkVersion,
26962        __input: &[u8],
26963    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26964        let avail_len = __input.len();
26965        let mut payload_buf = [0; Self::ENCODED_LEN];
26966        let mut buf = if avail_len < Self::ENCODED_LEN {
26967            payload_buf[0..avail_len].copy_from_slice(__input);
26968            Bytes::new(&payload_buf)
26969        } else {
26970            Bytes::new(__input)
26971        };
26972        let mut __struct = Self::default();
26973        __struct.time_boot_ms = buf.get_u32_le();
26974        __struct.chan1_scaled = buf.get_i16_le();
26975        __struct.chan2_scaled = buf.get_i16_le();
26976        __struct.chan3_scaled = buf.get_i16_le();
26977        __struct.chan4_scaled = buf.get_i16_le();
26978        __struct.chan5_scaled = buf.get_i16_le();
26979        __struct.chan6_scaled = buf.get_i16_le();
26980        __struct.chan7_scaled = buf.get_i16_le();
26981        __struct.chan8_scaled = buf.get_i16_le();
26982        __struct.port = buf.get_u8();
26983        __struct.rssi = buf.get_u8();
26984        Ok(__struct)
26985    }
26986    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26987        let mut __tmp = BytesMut::new(bytes);
26988        #[allow(clippy::absurd_extreme_comparisons)]
26989        #[allow(unused_comparisons)]
26990        if __tmp.remaining() < Self::ENCODED_LEN {
26991            panic!(
26992                "buffer is too small (need {} bytes, but got {})",
26993                Self::ENCODED_LEN,
26994                __tmp.remaining(),
26995            )
26996        }
26997        __tmp.put_u32_le(self.time_boot_ms);
26998        __tmp.put_i16_le(self.chan1_scaled);
26999        __tmp.put_i16_le(self.chan2_scaled);
27000        __tmp.put_i16_le(self.chan3_scaled);
27001        __tmp.put_i16_le(self.chan4_scaled);
27002        __tmp.put_i16_le(self.chan5_scaled);
27003        __tmp.put_i16_le(self.chan6_scaled);
27004        __tmp.put_i16_le(self.chan7_scaled);
27005        __tmp.put_i16_le(self.chan8_scaled);
27006        __tmp.put_u8(self.port);
27007        __tmp.put_u8(self.rssi);
27008        if matches!(version, MavlinkVersion::V2) {
27009            let len = __tmp.len();
27010            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27011        } else {
27012            __tmp.len()
27013        }
27014    }
27015}
27016#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
27017#[doc = "Request a data stream."]
27018#[doc = ""]
27019#[doc = "ID: 66"]
27020#[derive(Debug, Clone, PartialEq)]
27021#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27022#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27023#[cfg_attr(feature = "ts", derive(TS))]
27024#[cfg_attr(feature = "ts", ts(export))]
27025pub struct REQUEST_DATA_STREAM_DATA {
27026    #[doc = "The requested message rate"]
27027    pub req_message_rate: u16,
27028    #[doc = "The target requested to send the message stream."]
27029    pub target_system: u8,
27030    #[doc = "The target requested to send the message stream."]
27031    pub target_component: u8,
27032    #[doc = "The ID of the requested data stream"]
27033    pub req_stream_id: u8,
27034    #[doc = "1 to start sending, 0 to stop sending."]
27035    pub start_stop: u8,
27036}
27037impl REQUEST_DATA_STREAM_DATA {
27038    pub const ENCODED_LEN: usize = 6usize;
27039    pub const DEFAULT: Self = Self {
27040        req_message_rate: 0_u16,
27041        target_system: 0_u8,
27042        target_component: 0_u8,
27043        req_stream_id: 0_u8,
27044        start_stop: 0_u8,
27045    };
27046    #[cfg(feature = "arbitrary")]
27047    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27048        use arbitrary::{Arbitrary, Unstructured};
27049        let mut buf = [0u8; 1024];
27050        rng.fill_bytes(&mut buf);
27051        let mut unstructured = Unstructured::new(&buf);
27052        Self::arbitrary(&mut unstructured).unwrap_or_default()
27053    }
27054}
27055impl Default for REQUEST_DATA_STREAM_DATA {
27056    fn default() -> Self {
27057        Self::DEFAULT.clone()
27058    }
27059}
27060impl MessageData for REQUEST_DATA_STREAM_DATA {
27061    type Message = MavMessage;
27062    const ID: u32 = 66u32;
27063    const NAME: &'static str = "REQUEST_DATA_STREAM";
27064    const EXTRA_CRC: u8 = 148u8;
27065    const ENCODED_LEN: usize = 6usize;
27066    fn deser(
27067        _version: MavlinkVersion,
27068        __input: &[u8],
27069    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27070        let avail_len = __input.len();
27071        let mut payload_buf = [0; Self::ENCODED_LEN];
27072        let mut buf = if avail_len < Self::ENCODED_LEN {
27073            payload_buf[0..avail_len].copy_from_slice(__input);
27074            Bytes::new(&payload_buf)
27075        } else {
27076            Bytes::new(__input)
27077        };
27078        let mut __struct = Self::default();
27079        __struct.req_message_rate = buf.get_u16_le();
27080        __struct.target_system = buf.get_u8();
27081        __struct.target_component = buf.get_u8();
27082        __struct.req_stream_id = buf.get_u8();
27083        __struct.start_stop = buf.get_u8();
27084        Ok(__struct)
27085    }
27086    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27087        let mut __tmp = BytesMut::new(bytes);
27088        #[allow(clippy::absurd_extreme_comparisons)]
27089        #[allow(unused_comparisons)]
27090        if __tmp.remaining() < Self::ENCODED_LEN {
27091            panic!(
27092                "buffer is too small (need {} bytes, but got {})",
27093                Self::ENCODED_LEN,
27094                __tmp.remaining(),
27095            )
27096        }
27097        __tmp.put_u16_le(self.req_message_rate);
27098        __tmp.put_u8(self.target_system);
27099        __tmp.put_u8(self.target_component);
27100        __tmp.put_u8(self.req_stream_id);
27101        __tmp.put_u8(self.start_stop);
27102        if matches!(version, MavlinkVersion::V2) {
27103            let len = __tmp.len();
27104            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27105        } else {
27106            __tmp.len()
27107        }
27108    }
27109}
27110#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
27111#[doc = ""]
27112#[doc = "ID: 412"]
27113#[derive(Debug, Clone, PartialEq)]
27114#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27115#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27116#[cfg_attr(feature = "ts", derive(TS))]
27117#[cfg_attr(feature = "ts", ts(export))]
27118pub struct REQUEST_EVENT_DATA {
27119    #[doc = "First sequence number of the requested event."]
27120    pub first_sequence: u16,
27121    #[doc = "Last sequence number of the requested event."]
27122    pub last_sequence: u16,
27123    #[doc = "System ID"]
27124    pub target_system: u8,
27125    #[doc = "Component ID"]
27126    pub target_component: u8,
27127}
27128impl REQUEST_EVENT_DATA {
27129    pub const ENCODED_LEN: usize = 6usize;
27130    pub const DEFAULT: Self = Self {
27131        first_sequence: 0_u16,
27132        last_sequence: 0_u16,
27133        target_system: 0_u8,
27134        target_component: 0_u8,
27135    };
27136    #[cfg(feature = "arbitrary")]
27137    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27138        use arbitrary::{Arbitrary, Unstructured};
27139        let mut buf = [0u8; 1024];
27140        rng.fill_bytes(&mut buf);
27141        let mut unstructured = Unstructured::new(&buf);
27142        Self::arbitrary(&mut unstructured).unwrap_or_default()
27143    }
27144}
27145impl Default for REQUEST_EVENT_DATA {
27146    fn default() -> Self {
27147        Self::DEFAULT.clone()
27148    }
27149}
27150impl MessageData for REQUEST_EVENT_DATA {
27151    type Message = MavMessage;
27152    const ID: u32 = 412u32;
27153    const NAME: &'static str = "REQUEST_EVENT";
27154    const EXTRA_CRC: u8 = 33u8;
27155    const ENCODED_LEN: usize = 6usize;
27156    fn deser(
27157        _version: MavlinkVersion,
27158        __input: &[u8],
27159    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27160        let avail_len = __input.len();
27161        let mut payload_buf = [0; Self::ENCODED_LEN];
27162        let mut buf = if avail_len < Self::ENCODED_LEN {
27163            payload_buf[0..avail_len].copy_from_slice(__input);
27164            Bytes::new(&payload_buf)
27165        } else {
27166            Bytes::new(__input)
27167        };
27168        let mut __struct = Self::default();
27169        __struct.first_sequence = buf.get_u16_le();
27170        __struct.last_sequence = buf.get_u16_le();
27171        __struct.target_system = buf.get_u8();
27172        __struct.target_component = buf.get_u8();
27173        Ok(__struct)
27174    }
27175    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27176        let mut __tmp = BytesMut::new(bytes);
27177        #[allow(clippy::absurd_extreme_comparisons)]
27178        #[allow(unused_comparisons)]
27179        if __tmp.remaining() < Self::ENCODED_LEN {
27180            panic!(
27181                "buffer is too small (need {} bytes, but got {})",
27182                Self::ENCODED_LEN,
27183                __tmp.remaining(),
27184            )
27185        }
27186        __tmp.put_u16_le(self.first_sequence);
27187        __tmp.put_u16_le(self.last_sequence);
27188        __tmp.put_u8(self.target_system);
27189        __tmp.put_u8(self.target_component);
27190        if matches!(version, MavlinkVersion::V2) {
27191            let len = __tmp.len();
27192            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27193        } else {
27194            __tmp.len()
27195        }
27196    }
27197}
27198#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
27199#[doc = ""]
27200#[doc = "ID: 142"]
27201#[derive(Debug, Clone, PartialEq)]
27202#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27203#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27204#[cfg_attr(feature = "ts", derive(TS))]
27205#[cfg_attr(feature = "ts", ts(export))]
27206pub struct RESOURCE_REQUEST_DATA {
27207    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
27208    pub request_id: u8,
27209    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
27210    pub uri_type: u8,
27211    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
27212    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27213    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27214    pub uri: [u8; 120],
27215    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
27216    pub transfer_type: u8,
27217    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
27218    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27219    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27220    pub storage: [u8; 120],
27221}
27222impl RESOURCE_REQUEST_DATA {
27223    pub const ENCODED_LEN: usize = 243usize;
27224    pub const DEFAULT: Self = Self {
27225        request_id: 0_u8,
27226        uri_type: 0_u8,
27227        uri: [0_u8; 120usize],
27228        transfer_type: 0_u8,
27229        storage: [0_u8; 120usize],
27230    };
27231    #[cfg(feature = "arbitrary")]
27232    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27233        use arbitrary::{Arbitrary, Unstructured};
27234        let mut buf = [0u8; 1024];
27235        rng.fill_bytes(&mut buf);
27236        let mut unstructured = Unstructured::new(&buf);
27237        Self::arbitrary(&mut unstructured).unwrap_or_default()
27238    }
27239}
27240impl Default for RESOURCE_REQUEST_DATA {
27241    fn default() -> Self {
27242        Self::DEFAULT.clone()
27243    }
27244}
27245impl MessageData for RESOURCE_REQUEST_DATA {
27246    type Message = MavMessage;
27247    const ID: u32 = 142u32;
27248    const NAME: &'static str = "RESOURCE_REQUEST";
27249    const EXTRA_CRC: u8 = 72u8;
27250    const ENCODED_LEN: usize = 243usize;
27251    fn deser(
27252        _version: MavlinkVersion,
27253        __input: &[u8],
27254    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27255        let avail_len = __input.len();
27256        let mut payload_buf = [0; Self::ENCODED_LEN];
27257        let mut buf = if avail_len < Self::ENCODED_LEN {
27258            payload_buf[0..avail_len].copy_from_slice(__input);
27259            Bytes::new(&payload_buf)
27260        } else {
27261            Bytes::new(__input)
27262        };
27263        let mut __struct = Self::default();
27264        __struct.request_id = buf.get_u8();
27265        __struct.uri_type = buf.get_u8();
27266        for v in &mut __struct.uri {
27267            let val = buf.get_u8();
27268            *v = val;
27269        }
27270        __struct.transfer_type = buf.get_u8();
27271        for v in &mut __struct.storage {
27272            let val = buf.get_u8();
27273            *v = val;
27274        }
27275        Ok(__struct)
27276    }
27277    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27278        let mut __tmp = BytesMut::new(bytes);
27279        #[allow(clippy::absurd_extreme_comparisons)]
27280        #[allow(unused_comparisons)]
27281        if __tmp.remaining() < Self::ENCODED_LEN {
27282            panic!(
27283                "buffer is too small (need {} bytes, but got {})",
27284                Self::ENCODED_LEN,
27285                __tmp.remaining(),
27286            )
27287        }
27288        __tmp.put_u8(self.request_id);
27289        __tmp.put_u8(self.uri_type);
27290        for val in &self.uri {
27291            __tmp.put_u8(*val);
27292        }
27293        __tmp.put_u8(self.transfer_type);
27294        for val in &self.storage {
27295            __tmp.put_u8(*val);
27296        }
27297        if matches!(version, MavlinkVersion::V2) {
27298            let len = __tmp.len();
27299            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27300        } else {
27301            __tmp.len()
27302        }
27303    }
27304}
27305#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
27306#[doc = ""]
27307#[doc = "ID: 413"]
27308#[derive(Debug, Clone, PartialEq)]
27309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27310#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27311#[cfg_attr(feature = "ts", derive(TS))]
27312#[cfg_attr(feature = "ts", ts(export))]
27313pub struct RESPONSE_EVENT_ERROR_DATA {
27314    #[doc = "Sequence number."]
27315    pub sequence: u16,
27316    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
27317    pub sequence_oldest_available: u16,
27318    #[doc = "System ID"]
27319    pub target_system: u8,
27320    #[doc = "Component ID"]
27321    pub target_component: u8,
27322    #[doc = "Error reason."]
27323    pub reason: MavEventErrorReason,
27324}
27325impl RESPONSE_EVENT_ERROR_DATA {
27326    pub const ENCODED_LEN: usize = 7usize;
27327    pub const DEFAULT: Self = Self {
27328        sequence: 0_u16,
27329        sequence_oldest_available: 0_u16,
27330        target_system: 0_u8,
27331        target_component: 0_u8,
27332        reason: MavEventErrorReason::DEFAULT,
27333    };
27334    #[cfg(feature = "arbitrary")]
27335    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27336        use arbitrary::{Arbitrary, Unstructured};
27337        let mut buf = [0u8; 1024];
27338        rng.fill_bytes(&mut buf);
27339        let mut unstructured = Unstructured::new(&buf);
27340        Self::arbitrary(&mut unstructured).unwrap_or_default()
27341    }
27342}
27343impl Default for RESPONSE_EVENT_ERROR_DATA {
27344    fn default() -> Self {
27345        Self::DEFAULT.clone()
27346    }
27347}
27348impl MessageData for RESPONSE_EVENT_ERROR_DATA {
27349    type Message = MavMessage;
27350    const ID: u32 = 413u32;
27351    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
27352    const EXTRA_CRC: u8 = 77u8;
27353    const ENCODED_LEN: usize = 7usize;
27354    fn deser(
27355        _version: MavlinkVersion,
27356        __input: &[u8],
27357    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27358        let avail_len = __input.len();
27359        let mut payload_buf = [0; Self::ENCODED_LEN];
27360        let mut buf = if avail_len < Self::ENCODED_LEN {
27361            payload_buf[0..avail_len].copy_from_slice(__input);
27362            Bytes::new(&payload_buf)
27363        } else {
27364            Bytes::new(__input)
27365        };
27366        let mut __struct = Self::default();
27367        __struct.sequence = buf.get_u16_le();
27368        __struct.sequence_oldest_available = buf.get_u16_le();
27369        __struct.target_system = buf.get_u8();
27370        __struct.target_component = buf.get_u8();
27371        let tmp = buf.get_u8();
27372        __struct.reason =
27373            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27374                enum_type: "MavEventErrorReason",
27375                value: tmp as u64,
27376            })?;
27377        Ok(__struct)
27378    }
27379    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27380        let mut __tmp = BytesMut::new(bytes);
27381        #[allow(clippy::absurd_extreme_comparisons)]
27382        #[allow(unused_comparisons)]
27383        if __tmp.remaining() < Self::ENCODED_LEN {
27384            panic!(
27385                "buffer is too small (need {} bytes, but got {})",
27386                Self::ENCODED_LEN,
27387                __tmp.remaining(),
27388            )
27389        }
27390        __tmp.put_u16_le(self.sequence);
27391        __tmp.put_u16_le(self.sequence_oldest_available);
27392        __tmp.put_u8(self.target_system);
27393        __tmp.put_u8(self.target_component);
27394        __tmp.put_u8(self.reason as u8);
27395        if matches!(version, MavlinkVersion::V2) {
27396            let len = __tmp.len();
27397            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27398        } else {
27399            __tmp.len()
27400        }
27401    }
27402}
27403#[doc = "Read out the safety zone the MAV currently assumes."]
27404#[doc = ""]
27405#[doc = "ID: 55"]
27406#[derive(Debug, Clone, PartialEq)]
27407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27409#[cfg_attr(feature = "ts", derive(TS))]
27410#[cfg_attr(feature = "ts", ts(export))]
27411pub struct SAFETY_ALLOWED_AREA_DATA {
27412    #[doc = "x position 1 / Latitude 1"]
27413    pub p1x: f32,
27414    #[doc = "y position 1 / Longitude 1"]
27415    pub p1y: f32,
27416    #[doc = "z position 1 / Altitude 1"]
27417    pub p1z: f32,
27418    #[doc = "x position 2 / Latitude 2"]
27419    pub p2x: f32,
27420    #[doc = "y position 2 / Longitude 2"]
27421    pub p2y: f32,
27422    #[doc = "z position 2 / Altitude 2"]
27423    pub p2z: f32,
27424    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27425    pub frame: MavFrame,
27426}
27427impl SAFETY_ALLOWED_AREA_DATA {
27428    pub const ENCODED_LEN: usize = 25usize;
27429    pub const DEFAULT: Self = Self {
27430        p1x: 0.0_f32,
27431        p1y: 0.0_f32,
27432        p1z: 0.0_f32,
27433        p2x: 0.0_f32,
27434        p2y: 0.0_f32,
27435        p2z: 0.0_f32,
27436        frame: MavFrame::DEFAULT,
27437    };
27438    #[cfg(feature = "arbitrary")]
27439    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27440        use arbitrary::{Arbitrary, Unstructured};
27441        let mut buf = [0u8; 1024];
27442        rng.fill_bytes(&mut buf);
27443        let mut unstructured = Unstructured::new(&buf);
27444        Self::arbitrary(&mut unstructured).unwrap_or_default()
27445    }
27446}
27447impl Default for SAFETY_ALLOWED_AREA_DATA {
27448    fn default() -> Self {
27449        Self::DEFAULT.clone()
27450    }
27451}
27452impl MessageData for SAFETY_ALLOWED_AREA_DATA {
27453    type Message = MavMessage;
27454    const ID: u32 = 55u32;
27455    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
27456    const EXTRA_CRC: u8 = 3u8;
27457    const ENCODED_LEN: usize = 25usize;
27458    fn deser(
27459        _version: MavlinkVersion,
27460        __input: &[u8],
27461    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27462        let avail_len = __input.len();
27463        let mut payload_buf = [0; Self::ENCODED_LEN];
27464        let mut buf = if avail_len < Self::ENCODED_LEN {
27465            payload_buf[0..avail_len].copy_from_slice(__input);
27466            Bytes::new(&payload_buf)
27467        } else {
27468            Bytes::new(__input)
27469        };
27470        let mut __struct = Self::default();
27471        __struct.p1x = buf.get_f32_le();
27472        __struct.p1y = buf.get_f32_le();
27473        __struct.p1z = buf.get_f32_le();
27474        __struct.p2x = buf.get_f32_le();
27475        __struct.p2y = buf.get_f32_le();
27476        __struct.p2z = buf.get_f32_le();
27477        let tmp = buf.get_u8();
27478        __struct.frame =
27479            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27480                enum_type: "MavFrame",
27481                value: tmp as u64,
27482            })?;
27483        Ok(__struct)
27484    }
27485    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27486        let mut __tmp = BytesMut::new(bytes);
27487        #[allow(clippy::absurd_extreme_comparisons)]
27488        #[allow(unused_comparisons)]
27489        if __tmp.remaining() < Self::ENCODED_LEN {
27490            panic!(
27491                "buffer is too small (need {} bytes, but got {})",
27492                Self::ENCODED_LEN,
27493                __tmp.remaining(),
27494            )
27495        }
27496        __tmp.put_f32_le(self.p1x);
27497        __tmp.put_f32_le(self.p1y);
27498        __tmp.put_f32_le(self.p1z);
27499        __tmp.put_f32_le(self.p2x);
27500        __tmp.put_f32_le(self.p2y);
27501        __tmp.put_f32_le(self.p2z);
27502        __tmp.put_u8(self.frame as u8);
27503        if matches!(version, MavlinkVersion::V2) {
27504            let len = __tmp.len();
27505            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27506        } else {
27507            __tmp.len()
27508        }
27509    }
27510}
27511#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
27512#[doc = ""]
27513#[doc = "ID: 54"]
27514#[derive(Debug, Clone, PartialEq)]
27515#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27517#[cfg_attr(feature = "ts", derive(TS))]
27518#[cfg_attr(feature = "ts", ts(export))]
27519pub struct SAFETY_SET_ALLOWED_AREA_DATA {
27520    #[doc = "x position 1 / Latitude 1"]
27521    pub p1x: f32,
27522    #[doc = "y position 1 / Longitude 1"]
27523    pub p1y: f32,
27524    #[doc = "z position 1 / Altitude 1"]
27525    pub p1z: f32,
27526    #[doc = "x position 2 / Latitude 2"]
27527    pub p2x: f32,
27528    #[doc = "y position 2 / Longitude 2"]
27529    pub p2y: f32,
27530    #[doc = "z position 2 / Altitude 2"]
27531    pub p2z: f32,
27532    #[doc = "System ID"]
27533    pub target_system: u8,
27534    #[doc = "Component ID"]
27535    pub target_component: u8,
27536    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27537    pub frame: MavFrame,
27538}
27539impl SAFETY_SET_ALLOWED_AREA_DATA {
27540    pub const ENCODED_LEN: usize = 27usize;
27541    pub const DEFAULT: Self = Self {
27542        p1x: 0.0_f32,
27543        p1y: 0.0_f32,
27544        p1z: 0.0_f32,
27545        p2x: 0.0_f32,
27546        p2y: 0.0_f32,
27547        p2z: 0.0_f32,
27548        target_system: 0_u8,
27549        target_component: 0_u8,
27550        frame: MavFrame::DEFAULT,
27551    };
27552    #[cfg(feature = "arbitrary")]
27553    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27554        use arbitrary::{Arbitrary, Unstructured};
27555        let mut buf = [0u8; 1024];
27556        rng.fill_bytes(&mut buf);
27557        let mut unstructured = Unstructured::new(&buf);
27558        Self::arbitrary(&mut unstructured).unwrap_or_default()
27559    }
27560}
27561impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
27562    fn default() -> Self {
27563        Self::DEFAULT.clone()
27564    }
27565}
27566impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
27567    type Message = MavMessage;
27568    const ID: u32 = 54u32;
27569    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
27570    const EXTRA_CRC: u8 = 15u8;
27571    const ENCODED_LEN: usize = 27usize;
27572    fn deser(
27573        _version: MavlinkVersion,
27574        __input: &[u8],
27575    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27576        let avail_len = __input.len();
27577        let mut payload_buf = [0; Self::ENCODED_LEN];
27578        let mut buf = if avail_len < Self::ENCODED_LEN {
27579            payload_buf[0..avail_len].copy_from_slice(__input);
27580            Bytes::new(&payload_buf)
27581        } else {
27582            Bytes::new(__input)
27583        };
27584        let mut __struct = Self::default();
27585        __struct.p1x = buf.get_f32_le();
27586        __struct.p1y = buf.get_f32_le();
27587        __struct.p1z = buf.get_f32_le();
27588        __struct.p2x = buf.get_f32_le();
27589        __struct.p2y = buf.get_f32_le();
27590        __struct.p2z = buf.get_f32_le();
27591        __struct.target_system = buf.get_u8();
27592        __struct.target_component = buf.get_u8();
27593        let tmp = buf.get_u8();
27594        __struct.frame =
27595            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27596                enum_type: "MavFrame",
27597                value: tmp as u64,
27598            })?;
27599        Ok(__struct)
27600    }
27601    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27602        let mut __tmp = BytesMut::new(bytes);
27603        #[allow(clippy::absurd_extreme_comparisons)]
27604        #[allow(unused_comparisons)]
27605        if __tmp.remaining() < Self::ENCODED_LEN {
27606            panic!(
27607                "buffer is too small (need {} bytes, but got {})",
27608                Self::ENCODED_LEN,
27609                __tmp.remaining(),
27610            )
27611        }
27612        __tmp.put_f32_le(self.p1x);
27613        __tmp.put_f32_le(self.p1y);
27614        __tmp.put_f32_le(self.p1z);
27615        __tmp.put_f32_le(self.p2x);
27616        __tmp.put_f32_le(self.p2y);
27617        __tmp.put_f32_le(self.p2z);
27618        __tmp.put_u8(self.target_system);
27619        __tmp.put_u8(self.target_component);
27620        __tmp.put_u8(self.frame as u8);
27621        if matches!(version, MavlinkVersion::V2) {
27622            let len = __tmp.len();
27623            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27624        } else {
27625            __tmp.len()
27626        }
27627    }
27628}
27629#[doc = "Status of the SatCom link."]
27630#[doc = ""]
27631#[doc = "ID: 8015"]
27632#[derive(Debug, Clone, PartialEq)]
27633#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27635#[cfg_attr(feature = "ts", derive(TS))]
27636#[cfg_attr(feature = "ts", ts(export))]
27637pub struct SATCOM_LINK_STATUS_DATA {
27638    #[doc = "Timestamp"]
27639    pub timestamp: u64,
27640    #[doc = "Timestamp of the last successful sbd session"]
27641    pub last_heartbeat: u64,
27642    #[doc = "Number of failed sessions"]
27643    pub failed_sessions: u16,
27644    #[doc = "Number of successful sessions"]
27645    pub successful_sessions: u16,
27646    #[doc = "Signal quality"]
27647    pub signal_quality: u8,
27648    #[doc = "Ring call pending"]
27649    pub ring_pending: u8,
27650    #[doc = "Transmission session pending"]
27651    pub tx_session_pending: u8,
27652    #[doc = "Receiving session pending"]
27653    pub rx_session_pending: u8,
27654}
27655impl SATCOM_LINK_STATUS_DATA {
27656    pub const ENCODED_LEN: usize = 24usize;
27657    pub const DEFAULT: Self = Self {
27658        timestamp: 0_u64,
27659        last_heartbeat: 0_u64,
27660        failed_sessions: 0_u16,
27661        successful_sessions: 0_u16,
27662        signal_quality: 0_u8,
27663        ring_pending: 0_u8,
27664        tx_session_pending: 0_u8,
27665        rx_session_pending: 0_u8,
27666    };
27667    #[cfg(feature = "arbitrary")]
27668    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27669        use arbitrary::{Arbitrary, Unstructured};
27670        let mut buf = [0u8; 1024];
27671        rng.fill_bytes(&mut buf);
27672        let mut unstructured = Unstructured::new(&buf);
27673        Self::arbitrary(&mut unstructured).unwrap_or_default()
27674    }
27675}
27676impl Default for SATCOM_LINK_STATUS_DATA {
27677    fn default() -> Self {
27678        Self::DEFAULT.clone()
27679    }
27680}
27681impl MessageData for SATCOM_LINK_STATUS_DATA {
27682    type Message = MavMessage;
27683    const ID: u32 = 8015u32;
27684    const NAME: &'static str = "SATCOM_LINK_STATUS";
27685    const EXTRA_CRC: u8 = 23u8;
27686    const ENCODED_LEN: usize = 24usize;
27687    fn deser(
27688        _version: MavlinkVersion,
27689        __input: &[u8],
27690    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27691        let avail_len = __input.len();
27692        let mut payload_buf = [0; Self::ENCODED_LEN];
27693        let mut buf = if avail_len < Self::ENCODED_LEN {
27694            payload_buf[0..avail_len].copy_from_slice(__input);
27695            Bytes::new(&payload_buf)
27696        } else {
27697            Bytes::new(__input)
27698        };
27699        let mut __struct = Self::default();
27700        __struct.timestamp = buf.get_u64_le();
27701        __struct.last_heartbeat = buf.get_u64_le();
27702        __struct.failed_sessions = buf.get_u16_le();
27703        __struct.successful_sessions = buf.get_u16_le();
27704        __struct.signal_quality = buf.get_u8();
27705        __struct.ring_pending = buf.get_u8();
27706        __struct.tx_session_pending = buf.get_u8();
27707        __struct.rx_session_pending = buf.get_u8();
27708        Ok(__struct)
27709    }
27710    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27711        let mut __tmp = BytesMut::new(bytes);
27712        #[allow(clippy::absurd_extreme_comparisons)]
27713        #[allow(unused_comparisons)]
27714        if __tmp.remaining() < Self::ENCODED_LEN {
27715            panic!(
27716                "buffer is too small (need {} bytes, but got {})",
27717                Self::ENCODED_LEN,
27718                __tmp.remaining(),
27719            )
27720        }
27721        __tmp.put_u64_le(self.timestamp);
27722        __tmp.put_u64_le(self.last_heartbeat);
27723        __tmp.put_u16_le(self.failed_sessions);
27724        __tmp.put_u16_le(self.successful_sessions);
27725        __tmp.put_u8(self.signal_quality);
27726        __tmp.put_u8(self.ring_pending);
27727        __tmp.put_u8(self.tx_session_pending);
27728        __tmp.put_u8(self.rx_session_pending);
27729        if matches!(version, MavlinkVersion::V2) {
27730            let len = __tmp.len();
27731            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27732        } else {
27733            __tmp.len()
27734        }
27735    }
27736}
27737#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
27738#[doc = ""]
27739#[doc = "ID: 26"]
27740#[derive(Debug, Clone, PartialEq)]
27741#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27742#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27743#[cfg_attr(feature = "ts", derive(TS))]
27744#[cfg_attr(feature = "ts", ts(export))]
27745pub struct SCALED_IMU_DATA {
27746    #[doc = "Timestamp (time since system boot)."]
27747    pub time_boot_ms: u32,
27748    #[doc = "X acceleration"]
27749    pub xacc: i16,
27750    #[doc = "Y acceleration"]
27751    pub yacc: i16,
27752    #[doc = "Z acceleration"]
27753    pub zacc: i16,
27754    #[doc = "Angular speed around X axis"]
27755    pub xgyro: i16,
27756    #[doc = "Angular speed around Y axis"]
27757    pub ygyro: i16,
27758    #[doc = "Angular speed around Z axis"]
27759    pub zgyro: i16,
27760    #[doc = "X Magnetic field"]
27761    pub xmag: i16,
27762    #[doc = "Y Magnetic field"]
27763    pub ymag: i16,
27764    #[doc = "Z Magnetic field"]
27765    pub zmag: i16,
27766    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27767    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27768    pub temperature: i16,
27769}
27770impl SCALED_IMU_DATA {
27771    pub const ENCODED_LEN: usize = 24usize;
27772    pub const DEFAULT: Self = Self {
27773        time_boot_ms: 0_u32,
27774        xacc: 0_i16,
27775        yacc: 0_i16,
27776        zacc: 0_i16,
27777        xgyro: 0_i16,
27778        ygyro: 0_i16,
27779        zgyro: 0_i16,
27780        xmag: 0_i16,
27781        ymag: 0_i16,
27782        zmag: 0_i16,
27783        temperature: 0_i16,
27784    };
27785    #[cfg(feature = "arbitrary")]
27786    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27787        use arbitrary::{Arbitrary, Unstructured};
27788        let mut buf = [0u8; 1024];
27789        rng.fill_bytes(&mut buf);
27790        let mut unstructured = Unstructured::new(&buf);
27791        Self::arbitrary(&mut unstructured).unwrap_or_default()
27792    }
27793}
27794impl Default for SCALED_IMU_DATA {
27795    fn default() -> Self {
27796        Self::DEFAULT.clone()
27797    }
27798}
27799impl MessageData for SCALED_IMU_DATA {
27800    type Message = MavMessage;
27801    const ID: u32 = 26u32;
27802    const NAME: &'static str = "SCALED_IMU";
27803    const EXTRA_CRC: u8 = 170u8;
27804    const ENCODED_LEN: usize = 24usize;
27805    fn deser(
27806        _version: MavlinkVersion,
27807        __input: &[u8],
27808    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27809        let avail_len = __input.len();
27810        let mut payload_buf = [0; Self::ENCODED_LEN];
27811        let mut buf = if avail_len < Self::ENCODED_LEN {
27812            payload_buf[0..avail_len].copy_from_slice(__input);
27813            Bytes::new(&payload_buf)
27814        } else {
27815            Bytes::new(__input)
27816        };
27817        let mut __struct = Self::default();
27818        __struct.time_boot_ms = buf.get_u32_le();
27819        __struct.xacc = buf.get_i16_le();
27820        __struct.yacc = buf.get_i16_le();
27821        __struct.zacc = buf.get_i16_le();
27822        __struct.xgyro = buf.get_i16_le();
27823        __struct.ygyro = buf.get_i16_le();
27824        __struct.zgyro = buf.get_i16_le();
27825        __struct.xmag = buf.get_i16_le();
27826        __struct.ymag = buf.get_i16_le();
27827        __struct.zmag = buf.get_i16_le();
27828        __struct.temperature = buf.get_i16_le();
27829        Ok(__struct)
27830    }
27831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27832        let mut __tmp = BytesMut::new(bytes);
27833        #[allow(clippy::absurd_extreme_comparisons)]
27834        #[allow(unused_comparisons)]
27835        if __tmp.remaining() < Self::ENCODED_LEN {
27836            panic!(
27837                "buffer is too small (need {} bytes, but got {})",
27838                Self::ENCODED_LEN,
27839                __tmp.remaining(),
27840            )
27841        }
27842        __tmp.put_u32_le(self.time_boot_ms);
27843        __tmp.put_i16_le(self.xacc);
27844        __tmp.put_i16_le(self.yacc);
27845        __tmp.put_i16_le(self.zacc);
27846        __tmp.put_i16_le(self.xgyro);
27847        __tmp.put_i16_le(self.ygyro);
27848        __tmp.put_i16_le(self.zgyro);
27849        __tmp.put_i16_le(self.xmag);
27850        __tmp.put_i16_le(self.ymag);
27851        __tmp.put_i16_le(self.zmag);
27852        if matches!(version, MavlinkVersion::V2) {
27853            __tmp.put_i16_le(self.temperature);
27854            let len = __tmp.len();
27855            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27856        } else {
27857            __tmp.len()
27858        }
27859    }
27860}
27861#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
27862#[doc = ""]
27863#[doc = "ID: 116"]
27864#[derive(Debug, Clone, PartialEq)]
27865#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27866#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27867#[cfg_attr(feature = "ts", derive(TS))]
27868#[cfg_attr(feature = "ts", ts(export))]
27869pub struct SCALED_IMU2_DATA {
27870    #[doc = "Timestamp (time since system boot)."]
27871    pub time_boot_ms: u32,
27872    #[doc = "X acceleration"]
27873    pub xacc: i16,
27874    #[doc = "Y acceleration"]
27875    pub yacc: i16,
27876    #[doc = "Z acceleration"]
27877    pub zacc: i16,
27878    #[doc = "Angular speed around X axis"]
27879    pub xgyro: i16,
27880    #[doc = "Angular speed around Y axis"]
27881    pub ygyro: i16,
27882    #[doc = "Angular speed around Z axis"]
27883    pub zgyro: i16,
27884    #[doc = "X Magnetic field"]
27885    pub xmag: i16,
27886    #[doc = "Y Magnetic field"]
27887    pub ymag: i16,
27888    #[doc = "Z Magnetic field"]
27889    pub zmag: i16,
27890    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27891    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27892    pub temperature: i16,
27893}
27894impl SCALED_IMU2_DATA {
27895    pub const ENCODED_LEN: usize = 24usize;
27896    pub const DEFAULT: Self = Self {
27897        time_boot_ms: 0_u32,
27898        xacc: 0_i16,
27899        yacc: 0_i16,
27900        zacc: 0_i16,
27901        xgyro: 0_i16,
27902        ygyro: 0_i16,
27903        zgyro: 0_i16,
27904        xmag: 0_i16,
27905        ymag: 0_i16,
27906        zmag: 0_i16,
27907        temperature: 0_i16,
27908    };
27909    #[cfg(feature = "arbitrary")]
27910    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27911        use arbitrary::{Arbitrary, Unstructured};
27912        let mut buf = [0u8; 1024];
27913        rng.fill_bytes(&mut buf);
27914        let mut unstructured = Unstructured::new(&buf);
27915        Self::arbitrary(&mut unstructured).unwrap_or_default()
27916    }
27917}
27918impl Default for SCALED_IMU2_DATA {
27919    fn default() -> Self {
27920        Self::DEFAULT.clone()
27921    }
27922}
27923impl MessageData for SCALED_IMU2_DATA {
27924    type Message = MavMessage;
27925    const ID: u32 = 116u32;
27926    const NAME: &'static str = "SCALED_IMU2";
27927    const EXTRA_CRC: u8 = 76u8;
27928    const ENCODED_LEN: usize = 24usize;
27929    fn deser(
27930        _version: MavlinkVersion,
27931        __input: &[u8],
27932    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27933        let avail_len = __input.len();
27934        let mut payload_buf = [0; Self::ENCODED_LEN];
27935        let mut buf = if avail_len < Self::ENCODED_LEN {
27936            payload_buf[0..avail_len].copy_from_slice(__input);
27937            Bytes::new(&payload_buf)
27938        } else {
27939            Bytes::new(__input)
27940        };
27941        let mut __struct = Self::default();
27942        __struct.time_boot_ms = buf.get_u32_le();
27943        __struct.xacc = buf.get_i16_le();
27944        __struct.yacc = buf.get_i16_le();
27945        __struct.zacc = buf.get_i16_le();
27946        __struct.xgyro = buf.get_i16_le();
27947        __struct.ygyro = buf.get_i16_le();
27948        __struct.zgyro = buf.get_i16_le();
27949        __struct.xmag = buf.get_i16_le();
27950        __struct.ymag = buf.get_i16_le();
27951        __struct.zmag = buf.get_i16_le();
27952        __struct.temperature = buf.get_i16_le();
27953        Ok(__struct)
27954    }
27955    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27956        let mut __tmp = BytesMut::new(bytes);
27957        #[allow(clippy::absurd_extreme_comparisons)]
27958        #[allow(unused_comparisons)]
27959        if __tmp.remaining() < Self::ENCODED_LEN {
27960            panic!(
27961                "buffer is too small (need {} bytes, but got {})",
27962                Self::ENCODED_LEN,
27963                __tmp.remaining(),
27964            )
27965        }
27966        __tmp.put_u32_le(self.time_boot_ms);
27967        __tmp.put_i16_le(self.xacc);
27968        __tmp.put_i16_le(self.yacc);
27969        __tmp.put_i16_le(self.zacc);
27970        __tmp.put_i16_le(self.xgyro);
27971        __tmp.put_i16_le(self.ygyro);
27972        __tmp.put_i16_le(self.zgyro);
27973        __tmp.put_i16_le(self.xmag);
27974        __tmp.put_i16_le(self.ymag);
27975        __tmp.put_i16_le(self.zmag);
27976        if matches!(version, MavlinkVersion::V2) {
27977            __tmp.put_i16_le(self.temperature);
27978            let len = __tmp.len();
27979            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27980        } else {
27981            __tmp.len()
27982        }
27983    }
27984}
27985#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
27986#[doc = ""]
27987#[doc = "ID: 129"]
27988#[derive(Debug, Clone, PartialEq)]
27989#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27990#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27991#[cfg_attr(feature = "ts", derive(TS))]
27992#[cfg_attr(feature = "ts", ts(export))]
27993pub struct SCALED_IMU3_DATA {
27994    #[doc = "Timestamp (time since system boot)."]
27995    pub time_boot_ms: u32,
27996    #[doc = "X acceleration"]
27997    pub xacc: i16,
27998    #[doc = "Y acceleration"]
27999    pub yacc: i16,
28000    #[doc = "Z acceleration"]
28001    pub zacc: i16,
28002    #[doc = "Angular speed around X axis"]
28003    pub xgyro: i16,
28004    #[doc = "Angular speed around Y axis"]
28005    pub ygyro: i16,
28006    #[doc = "Angular speed around Z axis"]
28007    pub zgyro: i16,
28008    #[doc = "X Magnetic field"]
28009    pub xmag: i16,
28010    #[doc = "Y Magnetic field"]
28011    pub ymag: i16,
28012    #[doc = "Z Magnetic field"]
28013    pub zmag: i16,
28014    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
28015    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28016    pub temperature: i16,
28017}
28018impl SCALED_IMU3_DATA {
28019    pub const ENCODED_LEN: usize = 24usize;
28020    pub const DEFAULT: Self = Self {
28021        time_boot_ms: 0_u32,
28022        xacc: 0_i16,
28023        yacc: 0_i16,
28024        zacc: 0_i16,
28025        xgyro: 0_i16,
28026        ygyro: 0_i16,
28027        zgyro: 0_i16,
28028        xmag: 0_i16,
28029        ymag: 0_i16,
28030        zmag: 0_i16,
28031        temperature: 0_i16,
28032    };
28033    #[cfg(feature = "arbitrary")]
28034    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28035        use arbitrary::{Arbitrary, Unstructured};
28036        let mut buf = [0u8; 1024];
28037        rng.fill_bytes(&mut buf);
28038        let mut unstructured = Unstructured::new(&buf);
28039        Self::arbitrary(&mut unstructured).unwrap_or_default()
28040    }
28041}
28042impl Default for SCALED_IMU3_DATA {
28043    fn default() -> Self {
28044        Self::DEFAULT.clone()
28045    }
28046}
28047impl MessageData for SCALED_IMU3_DATA {
28048    type Message = MavMessage;
28049    const ID: u32 = 129u32;
28050    const NAME: &'static str = "SCALED_IMU3";
28051    const EXTRA_CRC: u8 = 46u8;
28052    const ENCODED_LEN: usize = 24usize;
28053    fn deser(
28054        _version: MavlinkVersion,
28055        __input: &[u8],
28056    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28057        let avail_len = __input.len();
28058        let mut payload_buf = [0; Self::ENCODED_LEN];
28059        let mut buf = if avail_len < Self::ENCODED_LEN {
28060            payload_buf[0..avail_len].copy_from_slice(__input);
28061            Bytes::new(&payload_buf)
28062        } else {
28063            Bytes::new(__input)
28064        };
28065        let mut __struct = Self::default();
28066        __struct.time_boot_ms = buf.get_u32_le();
28067        __struct.xacc = buf.get_i16_le();
28068        __struct.yacc = buf.get_i16_le();
28069        __struct.zacc = buf.get_i16_le();
28070        __struct.xgyro = buf.get_i16_le();
28071        __struct.ygyro = buf.get_i16_le();
28072        __struct.zgyro = buf.get_i16_le();
28073        __struct.xmag = buf.get_i16_le();
28074        __struct.ymag = buf.get_i16_le();
28075        __struct.zmag = buf.get_i16_le();
28076        __struct.temperature = buf.get_i16_le();
28077        Ok(__struct)
28078    }
28079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28080        let mut __tmp = BytesMut::new(bytes);
28081        #[allow(clippy::absurd_extreme_comparisons)]
28082        #[allow(unused_comparisons)]
28083        if __tmp.remaining() < Self::ENCODED_LEN {
28084            panic!(
28085                "buffer is too small (need {} bytes, but got {})",
28086                Self::ENCODED_LEN,
28087                __tmp.remaining(),
28088            )
28089        }
28090        __tmp.put_u32_le(self.time_boot_ms);
28091        __tmp.put_i16_le(self.xacc);
28092        __tmp.put_i16_le(self.yacc);
28093        __tmp.put_i16_le(self.zacc);
28094        __tmp.put_i16_le(self.xgyro);
28095        __tmp.put_i16_le(self.ygyro);
28096        __tmp.put_i16_le(self.zgyro);
28097        __tmp.put_i16_le(self.xmag);
28098        __tmp.put_i16_le(self.ymag);
28099        __tmp.put_i16_le(self.zmag);
28100        if matches!(version, MavlinkVersion::V2) {
28101            __tmp.put_i16_le(self.temperature);
28102            let len = __tmp.len();
28103            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28104        } else {
28105            __tmp.len()
28106        }
28107    }
28108}
28109#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
28110#[doc = ""]
28111#[doc = "ID: 29"]
28112#[derive(Debug, Clone, PartialEq)]
28113#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28114#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28115#[cfg_attr(feature = "ts", derive(TS))]
28116#[cfg_attr(feature = "ts", ts(export))]
28117pub struct SCALED_PRESSURE_DATA {
28118    #[doc = "Timestamp (time since system boot)."]
28119    pub time_boot_ms: u32,
28120    #[doc = "Absolute pressure"]
28121    pub press_abs: f32,
28122    #[doc = "Differential pressure 1"]
28123    pub press_diff: f32,
28124    #[doc = "Absolute pressure temperature"]
28125    pub temperature: i16,
28126    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
28127    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28128    pub temperature_press_diff: i16,
28129}
28130impl SCALED_PRESSURE_DATA {
28131    pub const ENCODED_LEN: usize = 16usize;
28132    pub const DEFAULT: Self = Self {
28133        time_boot_ms: 0_u32,
28134        press_abs: 0.0_f32,
28135        press_diff: 0.0_f32,
28136        temperature: 0_i16,
28137        temperature_press_diff: 0_i16,
28138    };
28139    #[cfg(feature = "arbitrary")]
28140    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28141        use arbitrary::{Arbitrary, Unstructured};
28142        let mut buf = [0u8; 1024];
28143        rng.fill_bytes(&mut buf);
28144        let mut unstructured = Unstructured::new(&buf);
28145        Self::arbitrary(&mut unstructured).unwrap_or_default()
28146    }
28147}
28148impl Default for SCALED_PRESSURE_DATA {
28149    fn default() -> Self {
28150        Self::DEFAULT.clone()
28151    }
28152}
28153impl MessageData for SCALED_PRESSURE_DATA {
28154    type Message = MavMessage;
28155    const ID: u32 = 29u32;
28156    const NAME: &'static str = "SCALED_PRESSURE";
28157    const EXTRA_CRC: u8 = 115u8;
28158    const ENCODED_LEN: usize = 16usize;
28159    fn deser(
28160        _version: MavlinkVersion,
28161        __input: &[u8],
28162    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28163        let avail_len = __input.len();
28164        let mut payload_buf = [0; Self::ENCODED_LEN];
28165        let mut buf = if avail_len < Self::ENCODED_LEN {
28166            payload_buf[0..avail_len].copy_from_slice(__input);
28167            Bytes::new(&payload_buf)
28168        } else {
28169            Bytes::new(__input)
28170        };
28171        let mut __struct = Self::default();
28172        __struct.time_boot_ms = buf.get_u32_le();
28173        __struct.press_abs = buf.get_f32_le();
28174        __struct.press_diff = buf.get_f32_le();
28175        __struct.temperature = buf.get_i16_le();
28176        __struct.temperature_press_diff = buf.get_i16_le();
28177        Ok(__struct)
28178    }
28179    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28180        let mut __tmp = BytesMut::new(bytes);
28181        #[allow(clippy::absurd_extreme_comparisons)]
28182        #[allow(unused_comparisons)]
28183        if __tmp.remaining() < Self::ENCODED_LEN {
28184            panic!(
28185                "buffer is too small (need {} bytes, but got {})",
28186                Self::ENCODED_LEN,
28187                __tmp.remaining(),
28188            )
28189        }
28190        __tmp.put_u32_le(self.time_boot_ms);
28191        __tmp.put_f32_le(self.press_abs);
28192        __tmp.put_f32_le(self.press_diff);
28193        __tmp.put_i16_le(self.temperature);
28194        if matches!(version, MavlinkVersion::V2) {
28195            __tmp.put_i16_le(self.temperature_press_diff);
28196            let len = __tmp.len();
28197            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28198        } else {
28199            __tmp.len()
28200        }
28201    }
28202}
28203#[doc = "Barometer readings for 2nd barometer."]
28204#[doc = ""]
28205#[doc = "ID: 137"]
28206#[derive(Debug, Clone, PartialEq)]
28207#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28209#[cfg_attr(feature = "ts", derive(TS))]
28210#[cfg_attr(feature = "ts", ts(export))]
28211pub struct SCALED_PRESSURE2_DATA {
28212    #[doc = "Timestamp (time since system boot)."]
28213    pub time_boot_ms: u32,
28214    #[doc = "Absolute pressure"]
28215    pub press_abs: f32,
28216    #[doc = "Differential pressure"]
28217    pub press_diff: f32,
28218    #[doc = "Absolute pressure temperature"]
28219    pub temperature: i16,
28220    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
28221    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28222    pub temperature_press_diff: i16,
28223}
28224impl SCALED_PRESSURE2_DATA {
28225    pub const ENCODED_LEN: usize = 16usize;
28226    pub const DEFAULT: Self = Self {
28227        time_boot_ms: 0_u32,
28228        press_abs: 0.0_f32,
28229        press_diff: 0.0_f32,
28230        temperature: 0_i16,
28231        temperature_press_diff: 0_i16,
28232    };
28233    #[cfg(feature = "arbitrary")]
28234    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28235        use arbitrary::{Arbitrary, Unstructured};
28236        let mut buf = [0u8; 1024];
28237        rng.fill_bytes(&mut buf);
28238        let mut unstructured = Unstructured::new(&buf);
28239        Self::arbitrary(&mut unstructured).unwrap_or_default()
28240    }
28241}
28242impl Default for SCALED_PRESSURE2_DATA {
28243    fn default() -> Self {
28244        Self::DEFAULT.clone()
28245    }
28246}
28247impl MessageData for SCALED_PRESSURE2_DATA {
28248    type Message = MavMessage;
28249    const ID: u32 = 137u32;
28250    const NAME: &'static str = "SCALED_PRESSURE2";
28251    const EXTRA_CRC: u8 = 195u8;
28252    const ENCODED_LEN: usize = 16usize;
28253    fn deser(
28254        _version: MavlinkVersion,
28255        __input: &[u8],
28256    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28257        let avail_len = __input.len();
28258        let mut payload_buf = [0; Self::ENCODED_LEN];
28259        let mut buf = if avail_len < Self::ENCODED_LEN {
28260            payload_buf[0..avail_len].copy_from_slice(__input);
28261            Bytes::new(&payload_buf)
28262        } else {
28263            Bytes::new(__input)
28264        };
28265        let mut __struct = Self::default();
28266        __struct.time_boot_ms = buf.get_u32_le();
28267        __struct.press_abs = buf.get_f32_le();
28268        __struct.press_diff = buf.get_f32_le();
28269        __struct.temperature = buf.get_i16_le();
28270        __struct.temperature_press_diff = buf.get_i16_le();
28271        Ok(__struct)
28272    }
28273    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28274        let mut __tmp = BytesMut::new(bytes);
28275        #[allow(clippy::absurd_extreme_comparisons)]
28276        #[allow(unused_comparisons)]
28277        if __tmp.remaining() < Self::ENCODED_LEN {
28278            panic!(
28279                "buffer is too small (need {} bytes, but got {})",
28280                Self::ENCODED_LEN,
28281                __tmp.remaining(),
28282            )
28283        }
28284        __tmp.put_u32_le(self.time_boot_ms);
28285        __tmp.put_f32_le(self.press_abs);
28286        __tmp.put_f32_le(self.press_diff);
28287        __tmp.put_i16_le(self.temperature);
28288        if matches!(version, MavlinkVersion::V2) {
28289            __tmp.put_i16_le(self.temperature_press_diff);
28290            let len = __tmp.len();
28291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28292        } else {
28293            __tmp.len()
28294        }
28295    }
28296}
28297#[doc = "Barometer readings for 3rd barometer."]
28298#[doc = ""]
28299#[doc = "ID: 143"]
28300#[derive(Debug, Clone, PartialEq)]
28301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28303#[cfg_attr(feature = "ts", derive(TS))]
28304#[cfg_attr(feature = "ts", ts(export))]
28305pub struct SCALED_PRESSURE3_DATA {
28306    #[doc = "Timestamp (time since system boot)."]
28307    pub time_boot_ms: u32,
28308    #[doc = "Absolute pressure"]
28309    pub press_abs: f32,
28310    #[doc = "Differential pressure"]
28311    pub press_diff: f32,
28312    #[doc = "Absolute pressure temperature"]
28313    pub temperature: i16,
28314    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
28315    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28316    pub temperature_press_diff: i16,
28317}
28318impl SCALED_PRESSURE3_DATA {
28319    pub const ENCODED_LEN: usize = 16usize;
28320    pub const DEFAULT: Self = Self {
28321        time_boot_ms: 0_u32,
28322        press_abs: 0.0_f32,
28323        press_diff: 0.0_f32,
28324        temperature: 0_i16,
28325        temperature_press_diff: 0_i16,
28326    };
28327    #[cfg(feature = "arbitrary")]
28328    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28329        use arbitrary::{Arbitrary, Unstructured};
28330        let mut buf = [0u8; 1024];
28331        rng.fill_bytes(&mut buf);
28332        let mut unstructured = Unstructured::new(&buf);
28333        Self::arbitrary(&mut unstructured).unwrap_or_default()
28334    }
28335}
28336impl Default for SCALED_PRESSURE3_DATA {
28337    fn default() -> Self {
28338        Self::DEFAULT.clone()
28339    }
28340}
28341impl MessageData for SCALED_PRESSURE3_DATA {
28342    type Message = MavMessage;
28343    const ID: u32 = 143u32;
28344    const NAME: &'static str = "SCALED_PRESSURE3";
28345    const EXTRA_CRC: u8 = 131u8;
28346    const ENCODED_LEN: usize = 16usize;
28347    fn deser(
28348        _version: MavlinkVersion,
28349        __input: &[u8],
28350    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28351        let avail_len = __input.len();
28352        let mut payload_buf = [0; Self::ENCODED_LEN];
28353        let mut buf = if avail_len < Self::ENCODED_LEN {
28354            payload_buf[0..avail_len].copy_from_slice(__input);
28355            Bytes::new(&payload_buf)
28356        } else {
28357            Bytes::new(__input)
28358        };
28359        let mut __struct = Self::default();
28360        __struct.time_boot_ms = buf.get_u32_le();
28361        __struct.press_abs = buf.get_f32_le();
28362        __struct.press_diff = buf.get_f32_le();
28363        __struct.temperature = buf.get_i16_le();
28364        __struct.temperature_press_diff = buf.get_i16_le();
28365        Ok(__struct)
28366    }
28367    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28368        let mut __tmp = BytesMut::new(bytes);
28369        #[allow(clippy::absurd_extreme_comparisons)]
28370        #[allow(unused_comparisons)]
28371        if __tmp.remaining() < Self::ENCODED_LEN {
28372            panic!(
28373                "buffer is too small (need {} bytes, but got {})",
28374                Self::ENCODED_LEN,
28375                __tmp.remaining(),
28376            )
28377        }
28378        __tmp.put_u32_le(self.time_boot_ms);
28379        __tmp.put_f32_le(self.press_abs);
28380        __tmp.put_f32_le(self.press_diff);
28381        __tmp.put_i16_le(self.temperature);
28382        if matches!(version, MavlinkVersion::V2) {
28383            __tmp.put_i16_le(self.temperature_press_diff);
28384            let len = __tmp.len();
28385            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28386        } else {
28387            __tmp.len()
28388        }
28389    }
28390}
28391#[doc = "Monitoring of sensorpod status."]
28392#[doc = ""]
28393#[doc = "ID: 8012"]
28394#[derive(Debug, Clone, PartialEq)]
28395#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28396#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28397#[cfg_attr(feature = "ts", derive(TS))]
28398#[cfg_attr(feature = "ts", ts(export))]
28399pub struct SENSORPOD_STATUS_DATA {
28400    #[doc = "Timestamp in linuxtime (since 1.1.1970)"]
28401    pub timestamp: u64,
28402    #[doc = "Free space available in recordings directory in [Gb] * 1e2"]
28403    pub free_space: u16,
28404    #[doc = "Rate of ROS topic 1"]
28405    pub visensor_rate_1: u8,
28406    #[doc = "Rate of ROS topic 2"]
28407    pub visensor_rate_2: u8,
28408    #[doc = "Rate of ROS topic 3"]
28409    pub visensor_rate_3: u8,
28410    #[doc = "Rate of ROS topic 4"]
28411    pub visensor_rate_4: u8,
28412    #[doc = "Number of recording nodes"]
28413    pub recording_nodes_count: u8,
28414    #[doc = "Temperature of sensorpod CPU in"]
28415    pub cpu_temp: u8,
28416}
28417impl SENSORPOD_STATUS_DATA {
28418    pub const ENCODED_LEN: usize = 16usize;
28419    pub const DEFAULT: Self = Self {
28420        timestamp: 0_u64,
28421        free_space: 0_u16,
28422        visensor_rate_1: 0_u8,
28423        visensor_rate_2: 0_u8,
28424        visensor_rate_3: 0_u8,
28425        visensor_rate_4: 0_u8,
28426        recording_nodes_count: 0_u8,
28427        cpu_temp: 0_u8,
28428    };
28429    #[cfg(feature = "arbitrary")]
28430    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28431        use arbitrary::{Arbitrary, Unstructured};
28432        let mut buf = [0u8; 1024];
28433        rng.fill_bytes(&mut buf);
28434        let mut unstructured = Unstructured::new(&buf);
28435        Self::arbitrary(&mut unstructured).unwrap_or_default()
28436    }
28437}
28438impl Default for SENSORPOD_STATUS_DATA {
28439    fn default() -> Self {
28440        Self::DEFAULT.clone()
28441    }
28442}
28443impl MessageData for SENSORPOD_STATUS_DATA {
28444    type Message = MavMessage;
28445    const ID: u32 = 8012u32;
28446    const NAME: &'static str = "SENSORPOD_STATUS";
28447    const EXTRA_CRC: u8 = 54u8;
28448    const ENCODED_LEN: usize = 16usize;
28449    fn deser(
28450        _version: MavlinkVersion,
28451        __input: &[u8],
28452    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28453        let avail_len = __input.len();
28454        let mut payload_buf = [0; Self::ENCODED_LEN];
28455        let mut buf = if avail_len < Self::ENCODED_LEN {
28456            payload_buf[0..avail_len].copy_from_slice(__input);
28457            Bytes::new(&payload_buf)
28458        } else {
28459            Bytes::new(__input)
28460        };
28461        let mut __struct = Self::default();
28462        __struct.timestamp = buf.get_u64_le();
28463        __struct.free_space = buf.get_u16_le();
28464        __struct.visensor_rate_1 = buf.get_u8();
28465        __struct.visensor_rate_2 = buf.get_u8();
28466        __struct.visensor_rate_3 = buf.get_u8();
28467        __struct.visensor_rate_4 = buf.get_u8();
28468        __struct.recording_nodes_count = buf.get_u8();
28469        __struct.cpu_temp = buf.get_u8();
28470        Ok(__struct)
28471    }
28472    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28473        let mut __tmp = BytesMut::new(bytes);
28474        #[allow(clippy::absurd_extreme_comparisons)]
28475        #[allow(unused_comparisons)]
28476        if __tmp.remaining() < Self::ENCODED_LEN {
28477            panic!(
28478                "buffer is too small (need {} bytes, but got {})",
28479                Self::ENCODED_LEN,
28480                __tmp.remaining(),
28481            )
28482        }
28483        __tmp.put_u64_le(self.timestamp);
28484        __tmp.put_u16_le(self.free_space);
28485        __tmp.put_u8(self.visensor_rate_1);
28486        __tmp.put_u8(self.visensor_rate_2);
28487        __tmp.put_u8(self.visensor_rate_3);
28488        __tmp.put_u8(self.visensor_rate_4);
28489        __tmp.put_u8(self.recording_nodes_count);
28490        __tmp.put_u8(self.cpu_temp);
28491        if matches!(version, MavlinkVersion::V2) {
28492            let len = __tmp.len();
28493            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28494        } else {
28495            __tmp.len()
28496        }
28497    }
28498}
28499#[doc = "Calibrated airflow angle measurements."]
28500#[doc = ""]
28501#[doc = "ID: 8016"]
28502#[derive(Debug, Clone, PartialEq)]
28503#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28504#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28505#[cfg_attr(feature = "ts", derive(TS))]
28506#[cfg_attr(feature = "ts", ts(export))]
28507pub struct SENSOR_AIRFLOW_ANGLES_DATA {
28508    #[doc = "Timestamp"]
28509    pub timestamp: u64,
28510    #[doc = "Angle of attack"]
28511    pub angleofattack: f32,
28512    #[doc = "Sideslip angle"]
28513    pub sideslip: f32,
28514    #[doc = "Angle of attack measurement valid"]
28515    pub angleofattack_valid: u8,
28516    #[doc = "Sideslip angle measurement valid"]
28517    pub sideslip_valid: u8,
28518}
28519impl SENSOR_AIRFLOW_ANGLES_DATA {
28520    pub const ENCODED_LEN: usize = 18usize;
28521    pub const DEFAULT: Self = Self {
28522        timestamp: 0_u64,
28523        angleofattack: 0.0_f32,
28524        sideslip: 0.0_f32,
28525        angleofattack_valid: 0_u8,
28526        sideslip_valid: 0_u8,
28527    };
28528    #[cfg(feature = "arbitrary")]
28529    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28530        use arbitrary::{Arbitrary, Unstructured};
28531        let mut buf = [0u8; 1024];
28532        rng.fill_bytes(&mut buf);
28533        let mut unstructured = Unstructured::new(&buf);
28534        Self::arbitrary(&mut unstructured).unwrap_or_default()
28535    }
28536}
28537impl Default for SENSOR_AIRFLOW_ANGLES_DATA {
28538    fn default() -> Self {
28539        Self::DEFAULT.clone()
28540    }
28541}
28542impl MessageData for SENSOR_AIRFLOW_ANGLES_DATA {
28543    type Message = MavMessage;
28544    const ID: u32 = 8016u32;
28545    const NAME: &'static str = "SENSOR_AIRFLOW_ANGLES";
28546    const EXTRA_CRC: u8 = 149u8;
28547    const ENCODED_LEN: usize = 18usize;
28548    fn deser(
28549        _version: MavlinkVersion,
28550        __input: &[u8],
28551    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28552        let avail_len = __input.len();
28553        let mut payload_buf = [0; Self::ENCODED_LEN];
28554        let mut buf = if avail_len < Self::ENCODED_LEN {
28555            payload_buf[0..avail_len].copy_from_slice(__input);
28556            Bytes::new(&payload_buf)
28557        } else {
28558            Bytes::new(__input)
28559        };
28560        let mut __struct = Self::default();
28561        __struct.timestamp = buf.get_u64_le();
28562        __struct.angleofattack = buf.get_f32_le();
28563        __struct.sideslip = buf.get_f32_le();
28564        __struct.angleofattack_valid = buf.get_u8();
28565        __struct.sideslip_valid = buf.get_u8();
28566        Ok(__struct)
28567    }
28568    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28569        let mut __tmp = BytesMut::new(bytes);
28570        #[allow(clippy::absurd_extreme_comparisons)]
28571        #[allow(unused_comparisons)]
28572        if __tmp.remaining() < Self::ENCODED_LEN {
28573            panic!(
28574                "buffer is too small (need {} bytes, but got {})",
28575                Self::ENCODED_LEN,
28576                __tmp.remaining(),
28577            )
28578        }
28579        __tmp.put_u64_le(self.timestamp);
28580        __tmp.put_f32_le(self.angleofattack);
28581        __tmp.put_f32_le(self.sideslip);
28582        __tmp.put_u8(self.angleofattack_valid);
28583        __tmp.put_u8(self.sideslip_valid);
28584        if matches!(version, MavlinkVersion::V2) {
28585            let len = __tmp.len();
28586            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28587        } else {
28588            __tmp.len()
28589        }
28590    }
28591}
28592#[doc = "Atmospheric sensors (temperature, humidity, ...)."]
28593#[doc = ""]
28594#[doc = "ID: 8009"]
28595#[derive(Debug, Clone, PartialEq)]
28596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28597#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28598#[cfg_attr(feature = "ts", derive(TS))]
28599#[cfg_attr(feature = "ts", ts(export))]
28600pub struct SENS_ATMOS_DATA {
28601    #[doc = "Time since system boot"]
28602    pub timestamp: u64,
28603    #[doc = "Ambient temperature"]
28604    pub TempAmbient: f32,
28605    #[doc = "Relative humidity"]
28606    pub Humidity: f32,
28607}
28608impl SENS_ATMOS_DATA {
28609    pub const ENCODED_LEN: usize = 16usize;
28610    pub const DEFAULT: Self = Self {
28611        timestamp: 0_u64,
28612        TempAmbient: 0.0_f32,
28613        Humidity: 0.0_f32,
28614    };
28615    #[cfg(feature = "arbitrary")]
28616    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28617        use arbitrary::{Arbitrary, Unstructured};
28618        let mut buf = [0u8; 1024];
28619        rng.fill_bytes(&mut buf);
28620        let mut unstructured = Unstructured::new(&buf);
28621        Self::arbitrary(&mut unstructured).unwrap_or_default()
28622    }
28623}
28624impl Default for SENS_ATMOS_DATA {
28625    fn default() -> Self {
28626        Self::DEFAULT.clone()
28627    }
28628}
28629impl MessageData for SENS_ATMOS_DATA {
28630    type Message = MavMessage;
28631    const ID: u32 = 8009u32;
28632    const NAME: &'static str = "SENS_ATMOS";
28633    const EXTRA_CRC: u8 = 144u8;
28634    const ENCODED_LEN: usize = 16usize;
28635    fn deser(
28636        _version: MavlinkVersion,
28637        __input: &[u8],
28638    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28639        let avail_len = __input.len();
28640        let mut payload_buf = [0; Self::ENCODED_LEN];
28641        let mut buf = if avail_len < Self::ENCODED_LEN {
28642            payload_buf[0..avail_len].copy_from_slice(__input);
28643            Bytes::new(&payload_buf)
28644        } else {
28645            Bytes::new(__input)
28646        };
28647        let mut __struct = Self::default();
28648        __struct.timestamp = buf.get_u64_le();
28649        __struct.TempAmbient = buf.get_f32_le();
28650        __struct.Humidity = buf.get_f32_le();
28651        Ok(__struct)
28652    }
28653    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28654        let mut __tmp = BytesMut::new(bytes);
28655        #[allow(clippy::absurd_extreme_comparisons)]
28656        #[allow(unused_comparisons)]
28657        if __tmp.remaining() < Self::ENCODED_LEN {
28658            panic!(
28659                "buffer is too small (need {} bytes, but got {})",
28660                Self::ENCODED_LEN,
28661                __tmp.remaining(),
28662            )
28663        }
28664        __tmp.put_u64_le(self.timestamp);
28665        __tmp.put_f32_le(self.TempAmbient);
28666        __tmp.put_f32_le(self.Humidity);
28667        if matches!(version, MavlinkVersion::V2) {
28668            let len = __tmp.len();
28669            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28670        } else {
28671            __tmp.len()
28672        }
28673    }
28674}
28675#[doc = "Battery pack monitoring data for Li-Ion batteries."]
28676#[doc = ""]
28677#[doc = "ID: 8010"]
28678#[derive(Debug, Clone, PartialEq)]
28679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28681#[cfg_attr(feature = "ts", derive(TS))]
28682#[cfg_attr(feature = "ts", ts(export))]
28683pub struct SENS_BATMON_DATA {
28684    #[doc = "Time since system start"]
28685    pub batmon_timestamp: u64,
28686    #[doc = "Battery pack temperature"]
28687    pub temperature: f32,
28688    #[doc = "Battery monitor safetystatus report bits in Hex"]
28689    pub safetystatus: u32,
28690    #[doc = "Battery monitor operation status report bits in Hex"]
28691    pub operationstatus: u32,
28692    #[doc = "Battery pack voltage"]
28693    pub voltage: u16,
28694    #[doc = "Battery pack current"]
28695    pub current: i16,
28696    #[doc = "Battery monitor status report bits in Hex"]
28697    pub batterystatus: u16,
28698    #[doc = "Battery monitor serial number in Hex"]
28699    pub serialnumber: u16,
28700    #[doc = "Battery pack cell 1 voltage"]
28701    pub cellvoltage1: u16,
28702    #[doc = "Battery pack cell 2 voltage"]
28703    pub cellvoltage2: u16,
28704    #[doc = "Battery pack cell 3 voltage"]
28705    pub cellvoltage3: u16,
28706    #[doc = "Battery pack cell 4 voltage"]
28707    pub cellvoltage4: u16,
28708    #[doc = "Battery pack cell 5 voltage"]
28709    pub cellvoltage5: u16,
28710    #[doc = "Battery pack cell 6 voltage"]
28711    pub cellvoltage6: u16,
28712    #[doc = "Battery pack state-of-charge"]
28713    pub SoC: u8,
28714}
28715impl SENS_BATMON_DATA {
28716    pub const ENCODED_LEN: usize = 41usize;
28717    pub const DEFAULT: Self = Self {
28718        batmon_timestamp: 0_u64,
28719        temperature: 0.0_f32,
28720        safetystatus: 0_u32,
28721        operationstatus: 0_u32,
28722        voltage: 0_u16,
28723        current: 0_i16,
28724        batterystatus: 0_u16,
28725        serialnumber: 0_u16,
28726        cellvoltage1: 0_u16,
28727        cellvoltage2: 0_u16,
28728        cellvoltage3: 0_u16,
28729        cellvoltage4: 0_u16,
28730        cellvoltage5: 0_u16,
28731        cellvoltage6: 0_u16,
28732        SoC: 0_u8,
28733    };
28734    #[cfg(feature = "arbitrary")]
28735    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28736        use arbitrary::{Arbitrary, Unstructured};
28737        let mut buf = [0u8; 1024];
28738        rng.fill_bytes(&mut buf);
28739        let mut unstructured = Unstructured::new(&buf);
28740        Self::arbitrary(&mut unstructured).unwrap_or_default()
28741    }
28742}
28743impl Default for SENS_BATMON_DATA {
28744    fn default() -> Self {
28745        Self::DEFAULT.clone()
28746    }
28747}
28748impl MessageData for SENS_BATMON_DATA {
28749    type Message = MavMessage;
28750    const ID: u32 = 8010u32;
28751    const NAME: &'static str = "SENS_BATMON";
28752    const EXTRA_CRC: u8 = 155u8;
28753    const ENCODED_LEN: usize = 41usize;
28754    fn deser(
28755        _version: MavlinkVersion,
28756        __input: &[u8],
28757    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28758        let avail_len = __input.len();
28759        let mut payload_buf = [0; Self::ENCODED_LEN];
28760        let mut buf = if avail_len < Self::ENCODED_LEN {
28761            payload_buf[0..avail_len].copy_from_slice(__input);
28762            Bytes::new(&payload_buf)
28763        } else {
28764            Bytes::new(__input)
28765        };
28766        let mut __struct = Self::default();
28767        __struct.batmon_timestamp = buf.get_u64_le();
28768        __struct.temperature = buf.get_f32_le();
28769        __struct.safetystatus = buf.get_u32_le();
28770        __struct.operationstatus = buf.get_u32_le();
28771        __struct.voltage = buf.get_u16_le();
28772        __struct.current = buf.get_i16_le();
28773        __struct.batterystatus = buf.get_u16_le();
28774        __struct.serialnumber = buf.get_u16_le();
28775        __struct.cellvoltage1 = buf.get_u16_le();
28776        __struct.cellvoltage2 = buf.get_u16_le();
28777        __struct.cellvoltage3 = buf.get_u16_le();
28778        __struct.cellvoltage4 = buf.get_u16_le();
28779        __struct.cellvoltage5 = buf.get_u16_le();
28780        __struct.cellvoltage6 = buf.get_u16_le();
28781        __struct.SoC = buf.get_u8();
28782        Ok(__struct)
28783    }
28784    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28785        let mut __tmp = BytesMut::new(bytes);
28786        #[allow(clippy::absurd_extreme_comparisons)]
28787        #[allow(unused_comparisons)]
28788        if __tmp.remaining() < Self::ENCODED_LEN {
28789            panic!(
28790                "buffer is too small (need {} bytes, but got {})",
28791                Self::ENCODED_LEN,
28792                __tmp.remaining(),
28793            )
28794        }
28795        __tmp.put_u64_le(self.batmon_timestamp);
28796        __tmp.put_f32_le(self.temperature);
28797        __tmp.put_u32_le(self.safetystatus);
28798        __tmp.put_u32_le(self.operationstatus);
28799        __tmp.put_u16_le(self.voltage);
28800        __tmp.put_i16_le(self.current);
28801        __tmp.put_u16_le(self.batterystatus);
28802        __tmp.put_u16_le(self.serialnumber);
28803        __tmp.put_u16_le(self.cellvoltage1);
28804        __tmp.put_u16_le(self.cellvoltage2);
28805        __tmp.put_u16_le(self.cellvoltage3);
28806        __tmp.put_u16_le(self.cellvoltage4);
28807        __tmp.put_u16_le(self.cellvoltage5);
28808        __tmp.put_u16_le(self.cellvoltage6);
28809        __tmp.put_u8(self.SoC);
28810        if matches!(version, MavlinkVersion::V2) {
28811            let len = __tmp.len();
28812            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28813        } else {
28814            __tmp.len()
28815        }
28816    }
28817}
28818#[doc = "Maximum Power Point Tracker (MPPT) sensor data for solar module power performance tracking."]
28819#[doc = ""]
28820#[doc = "ID: 8003"]
28821#[derive(Debug, Clone, PartialEq)]
28822#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28823#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28824#[cfg_attr(feature = "ts", derive(TS))]
28825#[cfg_attr(feature = "ts", ts(export))]
28826pub struct SENS_MPPT_DATA {
28827    #[doc = "MPPT last timestamp"]
28828    pub mppt_timestamp: u64,
28829    #[doc = "MPPT1 voltage"]
28830    pub mppt1_volt: f32,
28831    #[doc = "MPPT1 current"]
28832    pub mppt1_amp: f32,
28833    #[doc = "MPPT2 voltage"]
28834    pub mppt2_volt: f32,
28835    #[doc = "MPPT2 current"]
28836    pub mppt2_amp: f32,
28837    #[doc = "MPPT3 voltage"]
28838    pub mppt3_volt: f32,
28839    #[doc = "MPPT3 current"]
28840    pub mppt3_amp: f32,
28841    #[doc = "MPPT1 pwm"]
28842    pub mppt1_pwm: u16,
28843    #[doc = "MPPT2 pwm"]
28844    pub mppt2_pwm: u16,
28845    #[doc = "MPPT3 pwm"]
28846    pub mppt3_pwm: u16,
28847    #[doc = "MPPT1 status"]
28848    pub mppt1_status: u8,
28849    #[doc = "MPPT2 status"]
28850    pub mppt2_status: u8,
28851    #[doc = "MPPT3 status"]
28852    pub mppt3_status: u8,
28853}
28854impl SENS_MPPT_DATA {
28855    pub const ENCODED_LEN: usize = 41usize;
28856    pub const DEFAULT: Self = Self {
28857        mppt_timestamp: 0_u64,
28858        mppt1_volt: 0.0_f32,
28859        mppt1_amp: 0.0_f32,
28860        mppt2_volt: 0.0_f32,
28861        mppt2_amp: 0.0_f32,
28862        mppt3_volt: 0.0_f32,
28863        mppt3_amp: 0.0_f32,
28864        mppt1_pwm: 0_u16,
28865        mppt2_pwm: 0_u16,
28866        mppt3_pwm: 0_u16,
28867        mppt1_status: 0_u8,
28868        mppt2_status: 0_u8,
28869        mppt3_status: 0_u8,
28870    };
28871    #[cfg(feature = "arbitrary")]
28872    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28873        use arbitrary::{Arbitrary, Unstructured};
28874        let mut buf = [0u8; 1024];
28875        rng.fill_bytes(&mut buf);
28876        let mut unstructured = Unstructured::new(&buf);
28877        Self::arbitrary(&mut unstructured).unwrap_or_default()
28878    }
28879}
28880impl Default for SENS_MPPT_DATA {
28881    fn default() -> Self {
28882        Self::DEFAULT.clone()
28883    }
28884}
28885impl MessageData for SENS_MPPT_DATA {
28886    type Message = MavMessage;
28887    const ID: u32 = 8003u32;
28888    const NAME: &'static str = "SENS_MPPT";
28889    const EXTRA_CRC: u8 = 231u8;
28890    const ENCODED_LEN: usize = 41usize;
28891    fn deser(
28892        _version: MavlinkVersion,
28893        __input: &[u8],
28894    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28895        let avail_len = __input.len();
28896        let mut payload_buf = [0; Self::ENCODED_LEN];
28897        let mut buf = if avail_len < Self::ENCODED_LEN {
28898            payload_buf[0..avail_len].copy_from_slice(__input);
28899            Bytes::new(&payload_buf)
28900        } else {
28901            Bytes::new(__input)
28902        };
28903        let mut __struct = Self::default();
28904        __struct.mppt_timestamp = buf.get_u64_le();
28905        __struct.mppt1_volt = buf.get_f32_le();
28906        __struct.mppt1_amp = buf.get_f32_le();
28907        __struct.mppt2_volt = buf.get_f32_le();
28908        __struct.mppt2_amp = buf.get_f32_le();
28909        __struct.mppt3_volt = buf.get_f32_le();
28910        __struct.mppt3_amp = buf.get_f32_le();
28911        __struct.mppt1_pwm = buf.get_u16_le();
28912        __struct.mppt2_pwm = buf.get_u16_le();
28913        __struct.mppt3_pwm = buf.get_u16_le();
28914        __struct.mppt1_status = buf.get_u8();
28915        __struct.mppt2_status = buf.get_u8();
28916        __struct.mppt3_status = buf.get_u8();
28917        Ok(__struct)
28918    }
28919    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28920        let mut __tmp = BytesMut::new(bytes);
28921        #[allow(clippy::absurd_extreme_comparisons)]
28922        #[allow(unused_comparisons)]
28923        if __tmp.remaining() < Self::ENCODED_LEN {
28924            panic!(
28925                "buffer is too small (need {} bytes, but got {})",
28926                Self::ENCODED_LEN,
28927                __tmp.remaining(),
28928            )
28929        }
28930        __tmp.put_u64_le(self.mppt_timestamp);
28931        __tmp.put_f32_le(self.mppt1_volt);
28932        __tmp.put_f32_le(self.mppt1_amp);
28933        __tmp.put_f32_le(self.mppt2_volt);
28934        __tmp.put_f32_le(self.mppt2_amp);
28935        __tmp.put_f32_le(self.mppt3_volt);
28936        __tmp.put_f32_le(self.mppt3_amp);
28937        __tmp.put_u16_le(self.mppt1_pwm);
28938        __tmp.put_u16_le(self.mppt2_pwm);
28939        __tmp.put_u16_le(self.mppt3_pwm);
28940        __tmp.put_u8(self.mppt1_status);
28941        __tmp.put_u8(self.mppt2_status);
28942        __tmp.put_u8(self.mppt3_status);
28943        if matches!(version, MavlinkVersion::V2) {
28944            let len = __tmp.len();
28945            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28946        } else {
28947            __tmp.len()
28948        }
28949    }
28950}
28951#[doc = "Voltage and current sensor data."]
28952#[doc = ""]
28953#[doc = "ID: 8002"]
28954#[derive(Debug, Clone, PartialEq)]
28955#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28956#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28957#[cfg_attr(feature = "ts", derive(TS))]
28958#[cfg_attr(feature = "ts", ts(export))]
28959pub struct SENS_POWER_DATA {
28960    #[doc = "Power board voltage sensor reading"]
28961    pub adc121_vspb_volt: f32,
28962    #[doc = "Power board current sensor reading"]
28963    pub adc121_cspb_amp: f32,
28964    #[doc = "Board current sensor 1 reading"]
28965    pub adc121_cs1_amp: f32,
28966    #[doc = "Board current sensor 2 reading"]
28967    pub adc121_cs2_amp: f32,
28968}
28969impl SENS_POWER_DATA {
28970    pub const ENCODED_LEN: usize = 16usize;
28971    pub const DEFAULT: Self = Self {
28972        adc121_vspb_volt: 0.0_f32,
28973        adc121_cspb_amp: 0.0_f32,
28974        adc121_cs1_amp: 0.0_f32,
28975        adc121_cs2_amp: 0.0_f32,
28976    };
28977    #[cfg(feature = "arbitrary")]
28978    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28979        use arbitrary::{Arbitrary, Unstructured};
28980        let mut buf = [0u8; 1024];
28981        rng.fill_bytes(&mut buf);
28982        let mut unstructured = Unstructured::new(&buf);
28983        Self::arbitrary(&mut unstructured).unwrap_or_default()
28984    }
28985}
28986impl Default for SENS_POWER_DATA {
28987    fn default() -> Self {
28988        Self::DEFAULT.clone()
28989    }
28990}
28991impl MessageData for SENS_POWER_DATA {
28992    type Message = MavMessage;
28993    const ID: u32 = 8002u32;
28994    const NAME: &'static str = "SENS_POWER";
28995    const EXTRA_CRC: u8 = 218u8;
28996    const ENCODED_LEN: usize = 16usize;
28997    fn deser(
28998        _version: MavlinkVersion,
28999        __input: &[u8],
29000    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29001        let avail_len = __input.len();
29002        let mut payload_buf = [0; Self::ENCODED_LEN];
29003        let mut buf = if avail_len < Self::ENCODED_LEN {
29004            payload_buf[0..avail_len].copy_from_slice(__input);
29005            Bytes::new(&payload_buf)
29006        } else {
29007            Bytes::new(__input)
29008        };
29009        let mut __struct = Self::default();
29010        __struct.adc121_vspb_volt = buf.get_f32_le();
29011        __struct.adc121_cspb_amp = buf.get_f32_le();
29012        __struct.adc121_cs1_amp = buf.get_f32_le();
29013        __struct.adc121_cs2_amp = buf.get_f32_le();
29014        Ok(__struct)
29015    }
29016    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29017        let mut __tmp = BytesMut::new(bytes);
29018        #[allow(clippy::absurd_extreme_comparisons)]
29019        #[allow(unused_comparisons)]
29020        if __tmp.remaining() < Self::ENCODED_LEN {
29021            panic!(
29022                "buffer is too small (need {} bytes, but got {})",
29023                Self::ENCODED_LEN,
29024                __tmp.remaining(),
29025            )
29026        }
29027        __tmp.put_f32_le(self.adc121_vspb_volt);
29028        __tmp.put_f32_le(self.adc121_cspb_amp);
29029        __tmp.put_f32_le(self.adc121_cs1_amp);
29030        __tmp.put_f32_le(self.adc121_cs2_amp);
29031        if matches!(version, MavlinkVersion::V2) {
29032            let len = __tmp.len();
29033            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29034        } else {
29035            __tmp.len()
29036        }
29037    }
29038}
29039#[doc = "Monitoring of power board status."]
29040#[doc = ""]
29041#[doc = "ID: 8013"]
29042#[derive(Debug, Clone, PartialEq)]
29043#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29044#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29045#[cfg_attr(feature = "ts", derive(TS))]
29046#[cfg_attr(feature = "ts", ts(export))]
29047pub struct SENS_POWER_BOARD_DATA {
29048    #[doc = "Timestamp"]
29049    pub timestamp: u64,
29050    #[doc = "Power board system voltage"]
29051    pub pwr_brd_system_volt: f32,
29052    #[doc = "Power board servo voltage"]
29053    pub pwr_brd_servo_volt: f32,
29054    #[doc = "Power board digital voltage"]
29055    pub pwr_brd_digital_volt: f32,
29056    #[doc = "Power board left motor current sensor"]
29057    pub pwr_brd_mot_l_amp: f32,
29058    #[doc = "Power board right motor current sensor"]
29059    pub pwr_brd_mot_r_amp: f32,
29060    #[doc = "Power board analog current sensor"]
29061    pub pwr_brd_analog_amp: f32,
29062    #[doc = "Power board digital current sensor"]
29063    pub pwr_brd_digital_amp: f32,
29064    #[doc = "Power board extension current sensor"]
29065    pub pwr_brd_ext_amp: f32,
29066    #[doc = "Power board aux current sensor"]
29067    pub pwr_brd_aux_amp: f32,
29068    #[doc = "Power board status register"]
29069    pub pwr_brd_status: u8,
29070    #[doc = "Power board leds status"]
29071    pub pwr_brd_led_status: u8,
29072}
29073impl SENS_POWER_BOARD_DATA {
29074    pub const ENCODED_LEN: usize = 46usize;
29075    pub const DEFAULT: Self = Self {
29076        timestamp: 0_u64,
29077        pwr_brd_system_volt: 0.0_f32,
29078        pwr_brd_servo_volt: 0.0_f32,
29079        pwr_brd_digital_volt: 0.0_f32,
29080        pwr_brd_mot_l_amp: 0.0_f32,
29081        pwr_brd_mot_r_amp: 0.0_f32,
29082        pwr_brd_analog_amp: 0.0_f32,
29083        pwr_brd_digital_amp: 0.0_f32,
29084        pwr_brd_ext_amp: 0.0_f32,
29085        pwr_brd_aux_amp: 0.0_f32,
29086        pwr_brd_status: 0_u8,
29087        pwr_brd_led_status: 0_u8,
29088    };
29089    #[cfg(feature = "arbitrary")]
29090    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29091        use arbitrary::{Arbitrary, Unstructured};
29092        let mut buf = [0u8; 1024];
29093        rng.fill_bytes(&mut buf);
29094        let mut unstructured = Unstructured::new(&buf);
29095        Self::arbitrary(&mut unstructured).unwrap_or_default()
29096    }
29097}
29098impl Default for SENS_POWER_BOARD_DATA {
29099    fn default() -> Self {
29100        Self::DEFAULT.clone()
29101    }
29102}
29103impl MessageData for SENS_POWER_BOARD_DATA {
29104    type Message = MavMessage;
29105    const ID: u32 = 8013u32;
29106    const NAME: &'static str = "SENS_POWER_BOARD";
29107    const EXTRA_CRC: u8 = 222u8;
29108    const ENCODED_LEN: usize = 46usize;
29109    fn deser(
29110        _version: MavlinkVersion,
29111        __input: &[u8],
29112    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29113        let avail_len = __input.len();
29114        let mut payload_buf = [0; Self::ENCODED_LEN];
29115        let mut buf = if avail_len < Self::ENCODED_LEN {
29116            payload_buf[0..avail_len].copy_from_slice(__input);
29117            Bytes::new(&payload_buf)
29118        } else {
29119            Bytes::new(__input)
29120        };
29121        let mut __struct = Self::default();
29122        __struct.timestamp = buf.get_u64_le();
29123        __struct.pwr_brd_system_volt = buf.get_f32_le();
29124        __struct.pwr_brd_servo_volt = buf.get_f32_le();
29125        __struct.pwr_brd_digital_volt = buf.get_f32_le();
29126        __struct.pwr_brd_mot_l_amp = buf.get_f32_le();
29127        __struct.pwr_brd_mot_r_amp = buf.get_f32_le();
29128        __struct.pwr_brd_analog_amp = buf.get_f32_le();
29129        __struct.pwr_brd_digital_amp = buf.get_f32_le();
29130        __struct.pwr_brd_ext_amp = buf.get_f32_le();
29131        __struct.pwr_brd_aux_amp = buf.get_f32_le();
29132        __struct.pwr_brd_status = buf.get_u8();
29133        __struct.pwr_brd_led_status = buf.get_u8();
29134        Ok(__struct)
29135    }
29136    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29137        let mut __tmp = BytesMut::new(bytes);
29138        #[allow(clippy::absurd_extreme_comparisons)]
29139        #[allow(unused_comparisons)]
29140        if __tmp.remaining() < Self::ENCODED_LEN {
29141            panic!(
29142                "buffer is too small (need {} bytes, but got {})",
29143                Self::ENCODED_LEN,
29144                __tmp.remaining(),
29145            )
29146        }
29147        __tmp.put_u64_le(self.timestamp);
29148        __tmp.put_f32_le(self.pwr_brd_system_volt);
29149        __tmp.put_f32_le(self.pwr_brd_servo_volt);
29150        __tmp.put_f32_le(self.pwr_brd_digital_volt);
29151        __tmp.put_f32_le(self.pwr_brd_mot_l_amp);
29152        __tmp.put_f32_le(self.pwr_brd_mot_r_amp);
29153        __tmp.put_f32_le(self.pwr_brd_analog_amp);
29154        __tmp.put_f32_le(self.pwr_brd_digital_amp);
29155        __tmp.put_f32_le(self.pwr_brd_ext_amp);
29156        __tmp.put_f32_le(self.pwr_brd_aux_amp);
29157        __tmp.put_u8(self.pwr_brd_status);
29158        __tmp.put_u8(self.pwr_brd_led_status);
29159        if matches!(version, MavlinkVersion::V2) {
29160            let len = __tmp.len();
29161            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29162        } else {
29163            __tmp.len()
29164        }
29165    }
29166}
29167#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
29168#[doc = ""]
29169#[doc = "ID: 126"]
29170#[derive(Debug, Clone, PartialEq)]
29171#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29172#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29173#[cfg_attr(feature = "ts", derive(TS))]
29174#[cfg_attr(feature = "ts", ts(export))]
29175pub struct SERIAL_CONTROL_DATA {
29176    #[doc = "Baudrate of transfer. Zero means no change."]
29177    pub baudrate: u32,
29178    #[doc = "Timeout for reply data"]
29179    pub timeout: u16,
29180    #[doc = "Serial control device type."]
29181    pub device: SerialControlDev,
29182    #[doc = "Bitmap of serial control flags."]
29183    pub flags: SerialControlFlag,
29184    #[doc = "how many bytes in this transfer"]
29185    pub count: u8,
29186    #[doc = "serial data"]
29187    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29188    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29189    pub data: [u8; 70],
29190    #[doc = "System ID"]
29191    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29192    pub target_system: u8,
29193    #[doc = "Component ID"]
29194    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29195    pub target_component: u8,
29196}
29197impl SERIAL_CONTROL_DATA {
29198    pub const ENCODED_LEN: usize = 81usize;
29199    pub const DEFAULT: Self = Self {
29200        baudrate: 0_u32,
29201        timeout: 0_u16,
29202        device: SerialControlDev::DEFAULT,
29203        flags: SerialControlFlag::DEFAULT,
29204        count: 0_u8,
29205        data: [0_u8; 70usize],
29206        target_system: 0_u8,
29207        target_component: 0_u8,
29208    };
29209    #[cfg(feature = "arbitrary")]
29210    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29211        use arbitrary::{Arbitrary, Unstructured};
29212        let mut buf = [0u8; 1024];
29213        rng.fill_bytes(&mut buf);
29214        let mut unstructured = Unstructured::new(&buf);
29215        Self::arbitrary(&mut unstructured).unwrap_or_default()
29216    }
29217}
29218impl Default for SERIAL_CONTROL_DATA {
29219    fn default() -> Self {
29220        Self::DEFAULT.clone()
29221    }
29222}
29223impl MessageData for SERIAL_CONTROL_DATA {
29224    type Message = MavMessage;
29225    const ID: u32 = 126u32;
29226    const NAME: &'static str = "SERIAL_CONTROL";
29227    const EXTRA_CRC: u8 = 220u8;
29228    const ENCODED_LEN: usize = 81usize;
29229    fn deser(
29230        _version: MavlinkVersion,
29231        __input: &[u8],
29232    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29233        let avail_len = __input.len();
29234        let mut payload_buf = [0; Self::ENCODED_LEN];
29235        let mut buf = if avail_len < Self::ENCODED_LEN {
29236            payload_buf[0..avail_len].copy_from_slice(__input);
29237            Bytes::new(&payload_buf)
29238        } else {
29239            Bytes::new(__input)
29240        };
29241        let mut __struct = Self::default();
29242        __struct.baudrate = buf.get_u32_le();
29243        __struct.timeout = buf.get_u16_le();
29244        let tmp = buf.get_u8();
29245        __struct.device =
29246            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29247                enum_type: "SerialControlDev",
29248                value: tmp as u64,
29249            })?;
29250        let tmp = buf.get_u8();
29251        __struct.flags = SerialControlFlag::from_bits(tmp as <SerialControlFlag as Flags>::Bits)
29252            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29253                flag_type: "SerialControlFlag",
29254                value: tmp as u64,
29255            })?;
29256        __struct.count = buf.get_u8();
29257        for v in &mut __struct.data {
29258            let val = buf.get_u8();
29259            *v = val;
29260        }
29261        __struct.target_system = buf.get_u8();
29262        __struct.target_component = buf.get_u8();
29263        Ok(__struct)
29264    }
29265    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29266        let mut __tmp = BytesMut::new(bytes);
29267        #[allow(clippy::absurd_extreme_comparisons)]
29268        #[allow(unused_comparisons)]
29269        if __tmp.remaining() < Self::ENCODED_LEN {
29270            panic!(
29271                "buffer is too small (need {} bytes, but got {})",
29272                Self::ENCODED_LEN,
29273                __tmp.remaining(),
29274            )
29275        }
29276        __tmp.put_u32_le(self.baudrate);
29277        __tmp.put_u16_le(self.timeout);
29278        __tmp.put_u8(self.device as u8);
29279        __tmp.put_u8(self.flags.bits() as u8);
29280        __tmp.put_u8(self.count);
29281        for val in &self.data {
29282            __tmp.put_u8(*val);
29283        }
29284        if matches!(version, MavlinkVersion::V2) {
29285            __tmp.put_u8(self.target_system);
29286            __tmp.put_u8(self.target_component);
29287            let len = __tmp.len();
29288            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29289        } else {
29290            __tmp.len()
29291        }
29292    }
29293}
29294#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
29295#[doc = ""]
29296#[doc = "ID: 36"]
29297#[derive(Debug, Clone, PartialEq)]
29298#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29299#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29300#[cfg_attr(feature = "ts", derive(TS))]
29301#[cfg_attr(feature = "ts", ts(export))]
29302pub struct SERVO_OUTPUT_RAW_DATA {
29303    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29304    pub time_usec: u32,
29305    #[doc = "Servo output 1 value"]
29306    pub servo1_raw: u16,
29307    #[doc = "Servo output 2 value"]
29308    pub servo2_raw: u16,
29309    #[doc = "Servo output 3 value"]
29310    pub servo3_raw: u16,
29311    #[doc = "Servo output 4 value"]
29312    pub servo4_raw: u16,
29313    #[doc = "Servo output 5 value"]
29314    pub servo5_raw: u16,
29315    #[doc = "Servo output 6 value"]
29316    pub servo6_raw: u16,
29317    #[doc = "Servo output 7 value"]
29318    pub servo7_raw: u16,
29319    #[doc = "Servo output 8 value"]
29320    pub servo8_raw: u16,
29321    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
29322    pub port: u8,
29323    #[doc = "Servo output 9 value"]
29324    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29325    pub servo9_raw: u16,
29326    #[doc = "Servo output 10 value"]
29327    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29328    pub servo10_raw: u16,
29329    #[doc = "Servo output 11 value"]
29330    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29331    pub servo11_raw: u16,
29332    #[doc = "Servo output 12 value"]
29333    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29334    pub servo12_raw: u16,
29335    #[doc = "Servo output 13 value"]
29336    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29337    pub servo13_raw: u16,
29338    #[doc = "Servo output 14 value"]
29339    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29340    pub servo14_raw: u16,
29341    #[doc = "Servo output 15 value"]
29342    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29343    pub servo15_raw: u16,
29344    #[doc = "Servo output 16 value"]
29345    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29346    pub servo16_raw: u16,
29347}
29348impl SERVO_OUTPUT_RAW_DATA {
29349    pub const ENCODED_LEN: usize = 37usize;
29350    pub const DEFAULT: Self = Self {
29351        time_usec: 0_u32,
29352        servo1_raw: 0_u16,
29353        servo2_raw: 0_u16,
29354        servo3_raw: 0_u16,
29355        servo4_raw: 0_u16,
29356        servo5_raw: 0_u16,
29357        servo6_raw: 0_u16,
29358        servo7_raw: 0_u16,
29359        servo8_raw: 0_u16,
29360        port: 0_u8,
29361        servo9_raw: 0_u16,
29362        servo10_raw: 0_u16,
29363        servo11_raw: 0_u16,
29364        servo12_raw: 0_u16,
29365        servo13_raw: 0_u16,
29366        servo14_raw: 0_u16,
29367        servo15_raw: 0_u16,
29368        servo16_raw: 0_u16,
29369    };
29370    #[cfg(feature = "arbitrary")]
29371    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29372        use arbitrary::{Arbitrary, Unstructured};
29373        let mut buf = [0u8; 1024];
29374        rng.fill_bytes(&mut buf);
29375        let mut unstructured = Unstructured::new(&buf);
29376        Self::arbitrary(&mut unstructured).unwrap_or_default()
29377    }
29378}
29379impl Default for SERVO_OUTPUT_RAW_DATA {
29380    fn default() -> Self {
29381        Self::DEFAULT.clone()
29382    }
29383}
29384impl MessageData for SERVO_OUTPUT_RAW_DATA {
29385    type Message = MavMessage;
29386    const ID: u32 = 36u32;
29387    const NAME: &'static str = "SERVO_OUTPUT_RAW";
29388    const EXTRA_CRC: u8 = 222u8;
29389    const ENCODED_LEN: usize = 37usize;
29390    fn deser(
29391        _version: MavlinkVersion,
29392        __input: &[u8],
29393    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29394        let avail_len = __input.len();
29395        let mut payload_buf = [0; Self::ENCODED_LEN];
29396        let mut buf = if avail_len < Self::ENCODED_LEN {
29397            payload_buf[0..avail_len].copy_from_slice(__input);
29398            Bytes::new(&payload_buf)
29399        } else {
29400            Bytes::new(__input)
29401        };
29402        let mut __struct = Self::default();
29403        __struct.time_usec = buf.get_u32_le();
29404        __struct.servo1_raw = buf.get_u16_le();
29405        __struct.servo2_raw = buf.get_u16_le();
29406        __struct.servo3_raw = buf.get_u16_le();
29407        __struct.servo4_raw = buf.get_u16_le();
29408        __struct.servo5_raw = buf.get_u16_le();
29409        __struct.servo6_raw = buf.get_u16_le();
29410        __struct.servo7_raw = buf.get_u16_le();
29411        __struct.servo8_raw = buf.get_u16_le();
29412        __struct.port = buf.get_u8();
29413        __struct.servo9_raw = buf.get_u16_le();
29414        __struct.servo10_raw = buf.get_u16_le();
29415        __struct.servo11_raw = buf.get_u16_le();
29416        __struct.servo12_raw = buf.get_u16_le();
29417        __struct.servo13_raw = buf.get_u16_le();
29418        __struct.servo14_raw = buf.get_u16_le();
29419        __struct.servo15_raw = buf.get_u16_le();
29420        __struct.servo16_raw = buf.get_u16_le();
29421        Ok(__struct)
29422    }
29423    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29424        let mut __tmp = BytesMut::new(bytes);
29425        #[allow(clippy::absurd_extreme_comparisons)]
29426        #[allow(unused_comparisons)]
29427        if __tmp.remaining() < Self::ENCODED_LEN {
29428            panic!(
29429                "buffer is too small (need {} bytes, but got {})",
29430                Self::ENCODED_LEN,
29431                __tmp.remaining(),
29432            )
29433        }
29434        __tmp.put_u32_le(self.time_usec);
29435        __tmp.put_u16_le(self.servo1_raw);
29436        __tmp.put_u16_le(self.servo2_raw);
29437        __tmp.put_u16_le(self.servo3_raw);
29438        __tmp.put_u16_le(self.servo4_raw);
29439        __tmp.put_u16_le(self.servo5_raw);
29440        __tmp.put_u16_le(self.servo6_raw);
29441        __tmp.put_u16_le(self.servo7_raw);
29442        __tmp.put_u16_le(self.servo8_raw);
29443        __tmp.put_u8(self.port);
29444        if matches!(version, MavlinkVersion::V2) {
29445            __tmp.put_u16_le(self.servo9_raw);
29446            __tmp.put_u16_le(self.servo10_raw);
29447            __tmp.put_u16_le(self.servo11_raw);
29448            __tmp.put_u16_le(self.servo12_raw);
29449            __tmp.put_u16_le(self.servo13_raw);
29450            __tmp.put_u16_le(self.servo14_raw);
29451            __tmp.put_u16_le(self.servo15_raw);
29452            __tmp.put_u16_le(self.servo16_raw);
29453            let len = __tmp.len();
29454            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29455        } else {
29456            __tmp.len()
29457        }
29458    }
29459}
29460#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
29461#[doc = ""]
29462#[doc = "ID: 256"]
29463#[derive(Debug, Clone, PartialEq)]
29464#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29465#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29466#[cfg_attr(feature = "ts", derive(TS))]
29467#[cfg_attr(feature = "ts", ts(export))]
29468pub struct SETUP_SIGNING_DATA {
29469    #[doc = "initial timestamp"]
29470    pub initial_timestamp: u64,
29471    #[doc = "system id of the target"]
29472    pub target_system: u8,
29473    #[doc = "component ID of the target"]
29474    pub target_component: u8,
29475    #[doc = "signing key"]
29476    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29477    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29478    pub secret_key: [u8; 32],
29479}
29480impl SETUP_SIGNING_DATA {
29481    pub const ENCODED_LEN: usize = 42usize;
29482    pub const DEFAULT: Self = Self {
29483        initial_timestamp: 0_u64,
29484        target_system: 0_u8,
29485        target_component: 0_u8,
29486        secret_key: [0_u8; 32usize],
29487    };
29488    #[cfg(feature = "arbitrary")]
29489    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29490        use arbitrary::{Arbitrary, Unstructured};
29491        let mut buf = [0u8; 1024];
29492        rng.fill_bytes(&mut buf);
29493        let mut unstructured = Unstructured::new(&buf);
29494        Self::arbitrary(&mut unstructured).unwrap_or_default()
29495    }
29496}
29497impl Default for SETUP_SIGNING_DATA {
29498    fn default() -> Self {
29499        Self::DEFAULT.clone()
29500    }
29501}
29502impl MessageData for SETUP_SIGNING_DATA {
29503    type Message = MavMessage;
29504    const ID: u32 = 256u32;
29505    const NAME: &'static str = "SETUP_SIGNING";
29506    const EXTRA_CRC: u8 = 71u8;
29507    const ENCODED_LEN: usize = 42usize;
29508    fn deser(
29509        _version: MavlinkVersion,
29510        __input: &[u8],
29511    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29512        let avail_len = __input.len();
29513        let mut payload_buf = [0; Self::ENCODED_LEN];
29514        let mut buf = if avail_len < Self::ENCODED_LEN {
29515            payload_buf[0..avail_len].copy_from_slice(__input);
29516            Bytes::new(&payload_buf)
29517        } else {
29518            Bytes::new(__input)
29519        };
29520        let mut __struct = Self::default();
29521        __struct.initial_timestamp = buf.get_u64_le();
29522        __struct.target_system = buf.get_u8();
29523        __struct.target_component = buf.get_u8();
29524        for v in &mut __struct.secret_key {
29525            let val = buf.get_u8();
29526            *v = val;
29527        }
29528        Ok(__struct)
29529    }
29530    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29531        let mut __tmp = BytesMut::new(bytes);
29532        #[allow(clippy::absurd_extreme_comparisons)]
29533        #[allow(unused_comparisons)]
29534        if __tmp.remaining() < Self::ENCODED_LEN {
29535            panic!(
29536                "buffer is too small (need {} bytes, but got {})",
29537                Self::ENCODED_LEN,
29538                __tmp.remaining(),
29539            )
29540        }
29541        __tmp.put_u64_le(self.initial_timestamp);
29542        __tmp.put_u8(self.target_system);
29543        __tmp.put_u8(self.target_component);
29544        for val in &self.secret_key {
29545            __tmp.put_u8(*val);
29546        }
29547        if matches!(version, MavlinkVersion::V2) {
29548            let len = __tmp.len();
29549            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29550        } else {
29551            __tmp.len()
29552        }
29553    }
29554}
29555#[doc = "Set the vehicle attitude and body angular rates."]
29556#[doc = ""]
29557#[doc = "ID: 139"]
29558#[derive(Debug, Clone, PartialEq)]
29559#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29561#[cfg_attr(feature = "ts", derive(TS))]
29562#[cfg_attr(feature = "ts", ts(export))]
29563pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
29564    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29565    pub time_usec: u64,
29566    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
29567    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29568    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29569    pub controls: [f32; 8],
29570    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
29571    pub group_mlx: u8,
29572    #[doc = "System ID"]
29573    pub target_system: u8,
29574    #[doc = "Component ID"]
29575    pub target_component: u8,
29576}
29577impl SET_ACTUATOR_CONTROL_TARGET_DATA {
29578    pub const ENCODED_LEN: usize = 43usize;
29579    pub const DEFAULT: Self = Self {
29580        time_usec: 0_u64,
29581        controls: [0.0_f32; 8usize],
29582        group_mlx: 0_u8,
29583        target_system: 0_u8,
29584        target_component: 0_u8,
29585    };
29586    #[cfg(feature = "arbitrary")]
29587    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29588        use arbitrary::{Arbitrary, Unstructured};
29589        let mut buf = [0u8; 1024];
29590        rng.fill_bytes(&mut buf);
29591        let mut unstructured = Unstructured::new(&buf);
29592        Self::arbitrary(&mut unstructured).unwrap_or_default()
29593    }
29594}
29595impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
29596    fn default() -> Self {
29597        Self::DEFAULT.clone()
29598    }
29599}
29600impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
29601    type Message = MavMessage;
29602    const ID: u32 = 139u32;
29603    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
29604    const EXTRA_CRC: u8 = 168u8;
29605    const ENCODED_LEN: usize = 43usize;
29606    fn deser(
29607        _version: MavlinkVersion,
29608        __input: &[u8],
29609    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29610        let avail_len = __input.len();
29611        let mut payload_buf = [0; Self::ENCODED_LEN];
29612        let mut buf = if avail_len < Self::ENCODED_LEN {
29613            payload_buf[0..avail_len].copy_from_slice(__input);
29614            Bytes::new(&payload_buf)
29615        } else {
29616            Bytes::new(__input)
29617        };
29618        let mut __struct = Self::default();
29619        __struct.time_usec = buf.get_u64_le();
29620        for v in &mut __struct.controls {
29621            let val = buf.get_f32_le();
29622            *v = val;
29623        }
29624        __struct.group_mlx = buf.get_u8();
29625        __struct.target_system = buf.get_u8();
29626        __struct.target_component = buf.get_u8();
29627        Ok(__struct)
29628    }
29629    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29630        let mut __tmp = BytesMut::new(bytes);
29631        #[allow(clippy::absurd_extreme_comparisons)]
29632        #[allow(unused_comparisons)]
29633        if __tmp.remaining() < Self::ENCODED_LEN {
29634            panic!(
29635                "buffer is too small (need {} bytes, but got {})",
29636                Self::ENCODED_LEN,
29637                __tmp.remaining(),
29638            )
29639        }
29640        __tmp.put_u64_le(self.time_usec);
29641        for val in &self.controls {
29642            __tmp.put_f32_le(*val);
29643        }
29644        __tmp.put_u8(self.group_mlx);
29645        __tmp.put_u8(self.target_system);
29646        __tmp.put_u8(self.target_component);
29647        if matches!(version, MavlinkVersion::V2) {
29648            let len = __tmp.len();
29649            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29650        } else {
29651            __tmp.len()
29652        }
29653    }
29654}
29655#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
29656#[doc = ""]
29657#[doc = "ID: 82"]
29658#[derive(Debug, Clone, PartialEq)]
29659#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29660#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29661#[cfg_attr(feature = "ts", derive(TS))]
29662#[cfg_attr(feature = "ts", ts(export))]
29663pub struct SET_ATTITUDE_TARGET_DATA {
29664    #[doc = "Timestamp (time since system boot)."]
29665    pub time_boot_ms: u32,
29666    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
29667    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29668    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29669    pub q: [f32; 4],
29670    #[doc = "Body roll rate"]
29671    pub body_roll_rate: f32,
29672    #[doc = "Body pitch rate"]
29673    pub body_pitch_rate: f32,
29674    #[doc = "Body yaw rate"]
29675    pub body_yaw_rate: f32,
29676    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
29677    pub thrust: f32,
29678    #[doc = "System ID"]
29679    pub target_system: u8,
29680    #[doc = "Component ID"]
29681    pub target_component: u8,
29682    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29683    pub type_mask: AttitudeTargetTypemask,
29684    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
29685    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29686    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29687    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29688    pub thrust_body: [f32; 3],
29689}
29690impl SET_ATTITUDE_TARGET_DATA {
29691    pub const ENCODED_LEN: usize = 51usize;
29692    pub const DEFAULT: Self = Self {
29693        time_boot_ms: 0_u32,
29694        q: [0.0_f32; 4usize],
29695        body_roll_rate: 0.0_f32,
29696        body_pitch_rate: 0.0_f32,
29697        body_yaw_rate: 0.0_f32,
29698        thrust: 0.0_f32,
29699        target_system: 0_u8,
29700        target_component: 0_u8,
29701        type_mask: AttitudeTargetTypemask::DEFAULT,
29702        thrust_body: [0.0_f32; 3usize],
29703    };
29704    #[cfg(feature = "arbitrary")]
29705    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29706        use arbitrary::{Arbitrary, Unstructured};
29707        let mut buf = [0u8; 1024];
29708        rng.fill_bytes(&mut buf);
29709        let mut unstructured = Unstructured::new(&buf);
29710        Self::arbitrary(&mut unstructured).unwrap_or_default()
29711    }
29712}
29713impl Default for SET_ATTITUDE_TARGET_DATA {
29714    fn default() -> Self {
29715        Self::DEFAULT.clone()
29716    }
29717}
29718impl MessageData for SET_ATTITUDE_TARGET_DATA {
29719    type Message = MavMessage;
29720    const ID: u32 = 82u32;
29721    const NAME: &'static str = "SET_ATTITUDE_TARGET";
29722    const EXTRA_CRC: u8 = 49u8;
29723    const ENCODED_LEN: usize = 51usize;
29724    fn deser(
29725        _version: MavlinkVersion,
29726        __input: &[u8],
29727    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29728        let avail_len = __input.len();
29729        let mut payload_buf = [0; Self::ENCODED_LEN];
29730        let mut buf = if avail_len < Self::ENCODED_LEN {
29731            payload_buf[0..avail_len].copy_from_slice(__input);
29732            Bytes::new(&payload_buf)
29733        } else {
29734            Bytes::new(__input)
29735        };
29736        let mut __struct = Self::default();
29737        __struct.time_boot_ms = buf.get_u32_le();
29738        for v in &mut __struct.q {
29739            let val = buf.get_f32_le();
29740            *v = val;
29741        }
29742        __struct.body_roll_rate = buf.get_f32_le();
29743        __struct.body_pitch_rate = buf.get_f32_le();
29744        __struct.body_yaw_rate = buf.get_f32_le();
29745        __struct.thrust = buf.get_f32_le();
29746        __struct.target_system = buf.get_u8();
29747        __struct.target_component = buf.get_u8();
29748        let tmp = buf.get_u8();
29749        __struct.type_mask =
29750            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
29751                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29752                    flag_type: "AttitudeTargetTypemask",
29753                    value: tmp as u64,
29754                })?;
29755        for v in &mut __struct.thrust_body {
29756            let val = buf.get_f32_le();
29757            *v = val;
29758        }
29759        Ok(__struct)
29760    }
29761    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29762        let mut __tmp = BytesMut::new(bytes);
29763        #[allow(clippy::absurd_extreme_comparisons)]
29764        #[allow(unused_comparisons)]
29765        if __tmp.remaining() < Self::ENCODED_LEN {
29766            panic!(
29767                "buffer is too small (need {} bytes, but got {})",
29768                Self::ENCODED_LEN,
29769                __tmp.remaining(),
29770            )
29771        }
29772        __tmp.put_u32_le(self.time_boot_ms);
29773        for val in &self.q {
29774            __tmp.put_f32_le(*val);
29775        }
29776        __tmp.put_f32_le(self.body_roll_rate);
29777        __tmp.put_f32_le(self.body_pitch_rate);
29778        __tmp.put_f32_le(self.body_yaw_rate);
29779        __tmp.put_f32_le(self.thrust);
29780        __tmp.put_u8(self.target_system);
29781        __tmp.put_u8(self.target_component);
29782        __tmp.put_u8(self.type_mask.bits() as u8);
29783        if matches!(version, MavlinkVersion::V2) {
29784            for val in &self.thrust_body {
29785                __tmp.put_f32_le(*val);
29786            }
29787            let len = __tmp.len();
29788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29789        } else {
29790            __tmp.len()
29791        }
29792    }
29793}
29794#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
29795#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
29796#[doc = ""]
29797#[doc = "ID: 48"]
29798#[derive(Debug, Clone, PartialEq)]
29799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29801#[cfg_attr(feature = "ts", derive(TS))]
29802#[cfg_attr(feature = "ts", ts(export))]
29803pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
29804    #[doc = "Latitude (WGS84)"]
29805    pub latitude: i32,
29806    #[doc = "Longitude (WGS84)"]
29807    pub longitude: i32,
29808    #[doc = "Altitude (MSL). Positive for up."]
29809    pub altitude: i32,
29810    #[doc = "System ID"]
29811    pub target_system: u8,
29812    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29813    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29814    pub time_usec: u64,
29815}
29816impl SET_GPS_GLOBAL_ORIGIN_DATA {
29817    pub const ENCODED_LEN: usize = 21usize;
29818    pub const DEFAULT: Self = Self {
29819        latitude: 0_i32,
29820        longitude: 0_i32,
29821        altitude: 0_i32,
29822        target_system: 0_u8,
29823        time_usec: 0_u64,
29824    };
29825    #[cfg(feature = "arbitrary")]
29826    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29827        use arbitrary::{Arbitrary, Unstructured};
29828        let mut buf = [0u8; 1024];
29829        rng.fill_bytes(&mut buf);
29830        let mut unstructured = Unstructured::new(&buf);
29831        Self::arbitrary(&mut unstructured).unwrap_or_default()
29832    }
29833}
29834impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
29835    fn default() -> Self {
29836        Self::DEFAULT.clone()
29837    }
29838}
29839impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
29840    type Message = MavMessage;
29841    const ID: u32 = 48u32;
29842    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
29843    const EXTRA_CRC: u8 = 41u8;
29844    const ENCODED_LEN: usize = 21usize;
29845    fn deser(
29846        _version: MavlinkVersion,
29847        __input: &[u8],
29848    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29849        let avail_len = __input.len();
29850        let mut payload_buf = [0; Self::ENCODED_LEN];
29851        let mut buf = if avail_len < Self::ENCODED_LEN {
29852            payload_buf[0..avail_len].copy_from_slice(__input);
29853            Bytes::new(&payload_buf)
29854        } else {
29855            Bytes::new(__input)
29856        };
29857        let mut __struct = Self::default();
29858        __struct.latitude = buf.get_i32_le();
29859        __struct.longitude = buf.get_i32_le();
29860        __struct.altitude = buf.get_i32_le();
29861        __struct.target_system = buf.get_u8();
29862        __struct.time_usec = buf.get_u64_le();
29863        Ok(__struct)
29864    }
29865    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29866        let mut __tmp = BytesMut::new(bytes);
29867        #[allow(clippy::absurd_extreme_comparisons)]
29868        #[allow(unused_comparisons)]
29869        if __tmp.remaining() < Self::ENCODED_LEN {
29870            panic!(
29871                "buffer is too small (need {} bytes, but got {})",
29872                Self::ENCODED_LEN,
29873                __tmp.remaining(),
29874            )
29875        }
29876        __tmp.put_i32_le(self.latitude);
29877        __tmp.put_i32_le(self.longitude);
29878        __tmp.put_i32_le(self.altitude);
29879        __tmp.put_u8(self.target_system);
29880        if matches!(version, MavlinkVersion::V2) {
29881            __tmp.put_u64_le(self.time_usec);
29882            let len = __tmp.len();
29883            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29884        } else {
29885            __tmp.len()
29886        }
29887    }
29888}
29889#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
29890#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
29891#[doc = ""]
29892#[doc = "ID: 243"]
29893#[derive(Debug, Clone, PartialEq)]
29894#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29896#[cfg_attr(feature = "ts", derive(TS))]
29897#[cfg_attr(feature = "ts", ts(export))]
29898pub struct SET_HOME_POSITION_DATA {
29899    #[doc = "Latitude (WGS84)"]
29900    pub latitude: i32,
29901    #[doc = "Longitude (WGS84)"]
29902    pub longitude: i32,
29903    #[doc = "Altitude (MSL). Positive for up."]
29904    pub altitude: i32,
29905    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
29906    pub x: f32,
29907    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
29908    pub y: f32,
29909    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
29910    pub z: f32,
29911    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
29912    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29913    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29914    pub q: [f32; 4],
29915    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29916    pub approach_x: f32,
29917    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29918    pub approach_y: f32,
29919    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29920    pub approach_z: f32,
29921    #[doc = "System ID."]
29922    pub target_system: u8,
29923    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29924    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29925    pub time_usec: u64,
29926}
29927impl SET_HOME_POSITION_DATA {
29928    pub const ENCODED_LEN: usize = 61usize;
29929    pub const DEFAULT: Self = Self {
29930        latitude: 0_i32,
29931        longitude: 0_i32,
29932        altitude: 0_i32,
29933        x: 0.0_f32,
29934        y: 0.0_f32,
29935        z: 0.0_f32,
29936        q: [0.0_f32; 4usize],
29937        approach_x: 0.0_f32,
29938        approach_y: 0.0_f32,
29939        approach_z: 0.0_f32,
29940        target_system: 0_u8,
29941        time_usec: 0_u64,
29942    };
29943    #[cfg(feature = "arbitrary")]
29944    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29945        use arbitrary::{Arbitrary, Unstructured};
29946        let mut buf = [0u8; 1024];
29947        rng.fill_bytes(&mut buf);
29948        let mut unstructured = Unstructured::new(&buf);
29949        Self::arbitrary(&mut unstructured).unwrap_or_default()
29950    }
29951}
29952impl Default for SET_HOME_POSITION_DATA {
29953    fn default() -> Self {
29954        Self::DEFAULT.clone()
29955    }
29956}
29957impl MessageData for SET_HOME_POSITION_DATA {
29958    type Message = MavMessage;
29959    const ID: u32 = 243u32;
29960    const NAME: &'static str = "SET_HOME_POSITION";
29961    const EXTRA_CRC: u8 = 85u8;
29962    const ENCODED_LEN: usize = 61usize;
29963    fn deser(
29964        _version: MavlinkVersion,
29965        __input: &[u8],
29966    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29967        let avail_len = __input.len();
29968        let mut payload_buf = [0; Self::ENCODED_LEN];
29969        let mut buf = if avail_len < Self::ENCODED_LEN {
29970            payload_buf[0..avail_len].copy_from_slice(__input);
29971            Bytes::new(&payload_buf)
29972        } else {
29973            Bytes::new(__input)
29974        };
29975        let mut __struct = Self::default();
29976        __struct.latitude = buf.get_i32_le();
29977        __struct.longitude = buf.get_i32_le();
29978        __struct.altitude = buf.get_i32_le();
29979        __struct.x = buf.get_f32_le();
29980        __struct.y = buf.get_f32_le();
29981        __struct.z = buf.get_f32_le();
29982        for v in &mut __struct.q {
29983            let val = buf.get_f32_le();
29984            *v = val;
29985        }
29986        __struct.approach_x = buf.get_f32_le();
29987        __struct.approach_y = buf.get_f32_le();
29988        __struct.approach_z = buf.get_f32_le();
29989        __struct.target_system = buf.get_u8();
29990        __struct.time_usec = buf.get_u64_le();
29991        Ok(__struct)
29992    }
29993    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29994        let mut __tmp = BytesMut::new(bytes);
29995        #[allow(clippy::absurd_extreme_comparisons)]
29996        #[allow(unused_comparisons)]
29997        if __tmp.remaining() < Self::ENCODED_LEN {
29998            panic!(
29999                "buffer is too small (need {} bytes, but got {})",
30000                Self::ENCODED_LEN,
30001                __tmp.remaining(),
30002            )
30003        }
30004        __tmp.put_i32_le(self.latitude);
30005        __tmp.put_i32_le(self.longitude);
30006        __tmp.put_i32_le(self.altitude);
30007        __tmp.put_f32_le(self.x);
30008        __tmp.put_f32_le(self.y);
30009        __tmp.put_f32_le(self.z);
30010        for val in &self.q {
30011            __tmp.put_f32_le(*val);
30012        }
30013        __tmp.put_f32_le(self.approach_x);
30014        __tmp.put_f32_le(self.approach_y);
30015        __tmp.put_f32_le(self.approach_z);
30016        __tmp.put_u8(self.target_system);
30017        if matches!(version, MavlinkVersion::V2) {
30018            __tmp.put_u64_le(self.time_usec);
30019            let len = __tmp.len();
30020            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30021        } else {
30022            __tmp.len()
30023        }
30024    }
30025}
30026#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
30027#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
30028#[doc = ""]
30029#[doc = "ID: 11"]
30030#[derive(Debug, Clone, PartialEq)]
30031#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30033#[cfg_attr(feature = "ts", derive(TS))]
30034#[cfg_attr(feature = "ts", ts(export))]
30035pub struct SET_MODE_DATA {
30036    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
30037    pub custom_mode: u32,
30038    #[doc = "The system setting the mode"]
30039    pub target_system: u8,
30040    #[doc = "The new base mode."]
30041    pub base_mode: MavMode,
30042}
30043impl SET_MODE_DATA {
30044    pub const ENCODED_LEN: usize = 6usize;
30045    pub const DEFAULT: Self = Self {
30046        custom_mode: 0_u32,
30047        target_system: 0_u8,
30048        base_mode: MavMode::DEFAULT,
30049    };
30050    #[cfg(feature = "arbitrary")]
30051    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30052        use arbitrary::{Arbitrary, Unstructured};
30053        let mut buf = [0u8; 1024];
30054        rng.fill_bytes(&mut buf);
30055        let mut unstructured = Unstructured::new(&buf);
30056        Self::arbitrary(&mut unstructured).unwrap_or_default()
30057    }
30058}
30059impl Default for SET_MODE_DATA {
30060    fn default() -> Self {
30061        Self::DEFAULT.clone()
30062    }
30063}
30064impl MessageData for SET_MODE_DATA {
30065    type Message = MavMessage;
30066    const ID: u32 = 11u32;
30067    const NAME: &'static str = "SET_MODE";
30068    const EXTRA_CRC: u8 = 89u8;
30069    const ENCODED_LEN: usize = 6usize;
30070    fn deser(
30071        _version: MavlinkVersion,
30072        __input: &[u8],
30073    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30074        let avail_len = __input.len();
30075        let mut payload_buf = [0; Self::ENCODED_LEN];
30076        let mut buf = if avail_len < Self::ENCODED_LEN {
30077            payload_buf[0..avail_len].copy_from_slice(__input);
30078            Bytes::new(&payload_buf)
30079        } else {
30080            Bytes::new(__input)
30081        };
30082        let mut __struct = Self::default();
30083        __struct.custom_mode = buf.get_u32_le();
30084        __struct.target_system = buf.get_u8();
30085        let tmp = buf.get_u8();
30086        __struct.base_mode =
30087            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30088                enum_type: "MavMode",
30089                value: tmp as u64,
30090            })?;
30091        Ok(__struct)
30092    }
30093    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30094        let mut __tmp = BytesMut::new(bytes);
30095        #[allow(clippy::absurd_extreme_comparisons)]
30096        #[allow(unused_comparisons)]
30097        if __tmp.remaining() < Self::ENCODED_LEN {
30098            panic!(
30099                "buffer is too small (need {} bytes, but got {})",
30100                Self::ENCODED_LEN,
30101                __tmp.remaining(),
30102            )
30103        }
30104        __tmp.put_u32_le(self.custom_mode);
30105        __tmp.put_u8(self.target_system);
30106        __tmp.put_u8(self.base_mode as u8);
30107        if matches!(version, MavlinkVersion::V2) {
30108            let len = __tmp.len();
30109            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30110        } else {
30111            __tmp.len()
30112        }
30113    }
30114}
30115#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
30116#[doc = ""]
30117#[doc = "ID: 86"]
30118#[derive(Debug, Clone, PartialEq)]
30119#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30120#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30121#[cfg_attr(feature = "ts", derive(TS))]
30122#[cfg_attr(feature = "ts", ts(export))]
30123pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
30124    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
30125    pub time_boot_ms: u32,
30126    #[doc = "Latitude in WGS84 frame"]
30127    pub lat_int: i32,
30128    #[doc = "Longitude in WGS84 frame"]
30129    pub lon_int: i32,
30130    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
30131    pub alt: f32,
30132    #[doc = "X velocity in NED frame"]
30133    pub vx: f32,
30134    #[doc = "Y velocity in NED frame"]
30135    pub vy: f32,
30136    #[doc = "Z velocity in NED frame"]
30137    pub vz: f32,
30138    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30139    pub afx: f32,
30140    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30141    pub afy: f32,
30142    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30143    pub afz: f32,
30144    #[doc = "yaw setpoint"]
30145    pub yaw: f32,
30146    #[doc = "yaw rate setpoint"]
30147    pub yaw_rate: f32,
30148    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30149    pub type_mask: PositionTargetTypemask,
30150    #[doc = "System ID"]
30151    pub target_system: u8,
30152    #[doc = "Component ID"]
30153    pub target_component: u8,
30154    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
30155    pub coordinate_frame: MavFrame,
30156}
30157impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
30158    pub const ENCODED_LEN: usize = 53usize;
30159    pub const DEFAULT: Self = Self {
30160        time_boot_ms: 0_u32,
30161        lat_int: 0_i32,
30162        lon_int: 0_i32,
30163        alt: 0.0_f32,
30164        vx: 0.0_f32,
30165        vy: 0.0_f32,
30166        vz: 0.0_f32,
30167        afx: 0.0_f32,
30168        afy: 0.0_f32,
30169        afz: 0.0_f32,
30170        yaw: 0.0_f32,
30171        yaw_rate: 0.0_f32,
30172        type_mask: PositionTargetTypemask::DEFAULT,
30173        target_system: 0_u8,
30174        target_component: 0_u8,
30175        coordinate_frame: MavFrame::DEFAULT,
30176    };
30177    #[cfg(feature = "arbitrary")]
30178    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30179        use arbitrary::{Arbitrary, Unstructured};
30180        let mut buf = [0u8; 1024];
30181        rng.fill_bytes(&mut buf);
30182        let mut unstructured = Unstructured::new(&buf);
30183        Self::arbitrary(&mut unstructured).unwrap_or_default()
30184    }
30185}
30186impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
30187    fn default() -> Self {
30188        Self::DEFAULT.clone()
30189    }
30190}
30191impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
30192    type Message = MavMessage;
30193    const ID: u32 = 86u32;
30194    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
30195    const EXTRA_CRC: u8 = 5u8;
30196    const ENCODED_LEN: usize = 53usize;
30197    fn deser(
30198        _version: MavlinkVersion,
30199        __input: &[u8],
30200    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30201        let avail_len = __input.len();
30202        let mut payload_buf = [0; Self::ENCODED_LEN];
30203        let mut buf = if avail_len < Self::ENCODED_LEN {
30204            payload_buf[0..avail_len].copy_from_slice(__input);
30205            Bytes::new(&payload_buf)
30206        } else {
30207            Bytes::new(__input)
30208        };
30209        let mut __struct = Self::default();
30210        __struct.time_boot_ms = buf.get_u32_le();
30211        __struct.lat_int = buf.get_i32_le();
30212        __struct.lon_int = buf.get_i32_le();
30213        __struct.alt = buf.get_f32_le();
30214        __struct.vx = buf.get_f32_le();
30215        __struct.vy = buf.get_f32_le();
30216        __struct.vz = buf.get_f32_le();
30217        __struct.afx = buf.get_f32_le();
30218        __struct.afy = buf.get_f32_le();
30219        __struct.afz = buf.get_f32_le();
30220        __struct.yaw = buf.get_f32_le();
30221        __struct.yaw_rate = buf.get_f32_le();
30222        let tmp = buf.get_u16_le();
30223        __struct.type_mask =
30224            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
30225                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30226                    flag_type: "PositionTargetTypemask",
30227                    value: tmp as u64,
30228                })?;
30229        __struct.target_system = buf.get_u8();
30230        __struct.target_component = buf.get_u8();
30231        let tmp = buf.get_u8();
30232        __struct.coordinate_frame =
30233            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30234                enum_type: "MavFrame",
30235                value: tmp as u64,
30236            })?;
30237        Ok(__struct)
30238    }
30239    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30240        let mut __tmp = BytesMut::new(bytes);
30241        #[allow(clippy::absurd_extreme_comparisons)]
30242        #[allow(unused_comparisons)]
30243        if __tmp.remaining() < Self::ENCODED_LEN {
30244            panic!(
30245                "buffer is too small (need {} bytes, but got {})",
30246                Self::ENCODED_LEN,
30247                __tmp.remaining(),
30248            )
30249        }
30250        __tmp.put_u32_le(self.time_boot_ms);
30251        __tmp.put_i32_le(self.lat_int);
30252        __tmp.put_i32_le(self.lon_int);
30253        __tmp.put_f32_le(self.alt);
30254        __tmp.put_f32_le(self.vx);
30255        __tmp.put_f32_le(self.vy);
30256        __tmp.put_f32_le(self.vz);
30257        __tmp.put_f32_le(self.afx);
30258        __tmp.put_f32_le(self.afy);
30259        __tmp.put_f32_le(self.afz);
30260        __tmp.put_f32_le(self.yaw);
30261        __tmp.put_f32_le(self.yaw_rate);
30262        __tmp.put_u16_le(self.type_mask.bits() as u16);
30263        __tmp.put_u8(self.target_system);
30264        __tmp.put_u8(self.target_component);
30265        __tmp.put_u8(self.coordinate_frame as u8);
30266        if matches!(version, MavlinkVersion::V2) {
30267            let len = __tmp.len();
30268            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30269        } else {
30270            __tmp.len()
30271        }
30272    }
30273}
30274#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
30275#[doc = ""]
30276#[doc = "ID: 84"]
30277#[derive(Debug, Clone, PartialEq)]
30278#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30279#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30280#[cfg_attr(feature = "ts", derive(TS))]
30281#[cfg_attr(feature = "ts", ts(export))]
30282pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
30283    #[doc = "Timestamp (time since system boot)."]
30284    pub time_boot_ms: u32,
30285    #[doc = "X Position in NED frame"]
30286    pub x: f32,
30287    #[doc = "Y Position in NED frame"]
30288    pub y: f32,
30289    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
30290    pub z: f32,
30291    #[doc = "X velocity in NED frame"]
30292    pub vx: f32,
30293    #[doc = "Y velocity in NED frame"]
30294    pub vy: f32,
30295    #[doc = "Z velocity in NED frame"]
30296    pub vz: f32,
30297    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30298    pub afx: f32,
30299    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30300    pub afy: f32,
30301    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30302    pub afz: f32,
30303    #[doc = "yaw setpoint"]
30304    pub yaw: f32,
30305    #[doc = "yaw rate setpoint"]
30306    pub yaw_rate: f32,
30307    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30308    pub type_mask: PositionTargetTypemask,
30309    #[doc = "System ID"]
30310    pub target_system: u8,
30311    #[doc = "Component ID"]
30312    pub target_component: u8,
30313    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
30314    pub coordinate_frame: MavFrame,
30315}
30316impl SET_POSITION_TARGET_LOCAL_NED_DATA {
30317    pub const ENCODED_LEN: usize = 53usize;
30318    pub const DEFAULT: Self = Self {
30319        time_boot_ms: 0_u32,
30320        x: 0.0_f32,
30321        y: 0.0_f32,
30322        z: 0.0_f32,
30323        vx: 0.0_f32,
30324        vy: 0.0_f32,
30325        vz: 0.0_f32,
30326        afx: 0.0_f32,
30327        afy: 0.0_f32,
30328        afz: 0.0_f32,
30329        yaw: 0.0_f32,
30330        yaw_rate: 0.0_f32,
30331        type_mask: PositionTargetTypemask::DEFAULT,
30332        target_system: 0_u8,
30333        target_component: 0_u8,
30334        coordinate_frame: MavFrame::DEFAULT,
30335    };
30336    #[cfg(feature = "arbitrary")]
30337    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30338        use arbitrary::{Arbitrary, Unstructured};
30339        let mut buf = [0u8; 1024];
30340        rng.fill_bytes(&mut buf);
30341        let mut unstructured = Unstructured::new(&buf);
30342        Self::arbitrary(&mut unstructured).unwrap_or_default()
30343    }
30344}
30345impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
30346    fn default() -> Self {
30347        Self::DEFAULT.clone()
30348    }
30349}
30350impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
30351    type Message = MavMessage;
30352    const ID: u32 = 84u32;
30353    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
30354    const EXTRA_CRC: u8 = 143u8;
30355    const ENCODED_LEN: usize = 53usize;
30356    fn deser(
30357        _version: MavlinkVersion,
30358        __input: &[u8],
30359    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30360        let avail_len = __input.len();
30361        let mut payload_buf = [0; Self::ENCODED_LEN];
30362        let mut buf = if avail_len < Self::ENCODED_LEN {
30363            payload_buf[0..avail_len].copy_from_slice(__input);
30364            Bytes::new(&payload_buf)
30365        } else {
30366            Bytes::new(__input)
30367        };
30368        let mut __struct = Self::default();
30369        __struct.time_boot_ms = buf.get_u32_le();
30370        __struct.x = buf.get_f32_le();
30371        __struct.y = buf.get_f32_le();
30372        __struct.z = buf.get_f32_le();
30373        __struct.vx = buf.get_f32_le();
30374        __struct.vy = buf.get_f32_le();
30375        __struct.vz = buf.get_f32_le();
30376        __struct.afx = buf.get_f32_le();
30377        __struct.afy = buf.get_f32_le();
30378        __struct.afz = buf.get_f32_le();
30379        __struct.yaw = buf.get_f32_le();
30380        __struct.yaw_rate = buf.get_f32_le();
30381        let tmp = buf.get_u16_le();
30382        __struct.type_mask =
30383            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
30384                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30385                    flag_type: "PositionTargetTypemask",
30386                    value: tmp as u64,
30387                })?;
30388        __struct.target_system = buf.get_u8();
30389        __struct.target_component = buf.get_u8();
30390        let tmp = buf.get_u8();
30391        __struct.coordinate_frame =
30392            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30393                enum_type: "MavFrame",
30394                value: tmp as u64,
30395            })?;
30396        Ok(__struct)
30397    }
30398    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30399        let mut __tmp = BytesMut::new(bytes);
30400        #[allow(clippy::absurd_extreme_comparisons)]
30401        #[allow(unused_comparisons)]
30402        if __tmp.remaining() < Self::ENCODED_LEN {
30403            panic!(
30404                "buffer is too small (need {} bytes, but got {})",
30405                Self::ENCODED_LEN,
30406                __tmp.remaining(),
30407            )
30408        }
30409        __tmp.put_u32_le(self.time_boot_ms);
30410        __tmp.put_f32_le(self.x);
30411        __tmp.put_f32_le(self.y);
30412        __tmp.put_f32_le(self.z);
30413        __tmp.put_f32_le(self.vx);
30414        __tmp.put_f32_le(self.vy);
30415        __tmp.put_f32_le(self.vz);
30416        __tmp.put_f32_le(self.afx);
30417        __tmp.put_f32_le(self.afy);
30418        __tmp.put_f32_le(self.afz);
30419        __tmp.put_f32_le(self.yaw);
30420        __tmp.put_f32_le(self.yaw_rate);
30421        __tmp.put_u16_le(self.type_mask.bits() as u16);
30422        __tmp.put_u8(self.target_system);
30423        __tmp.put_u8(self.target_component);
30424        __tmp.put_u8(self.coordinate_frame as u8);
30425        if matches!(version, MavlinkVersion::V2) {
30426            let len = __tmp.len();
30427            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30428        } else {
30429            __tmp.len()
30430        }
30431    }
30432}
30433#[doc = "Status of simulation environment, if used."]
30434#[doc = ""]
30435#[doc = "ID: 108"]
30436#[derive(Debug, Clone, PartialEq)]
30437#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30438#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30439#[cfg_attr(feature = "ts", derive(TS))]
30440#[cfg_attr(feature = "ts", ts(export))]
30441pub struct SIM_STATE_DATA {
30442    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
30443    pub q1: f32,
30444    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
30445    pub q2: f32,
30446    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
30447    pub q3: f32,
30448    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
30449    pub q4: f32,
30450    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
30451    pub roll: f32,
30452    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
30453    pub pitch: f32,
30454    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
30455    pub yaw: f32,
30456    #[doc = "X acceleration"]
30457    pub xacc: f32,
30458    #[doc = "Y acceleration"]
30459    pub yacc: f32,
30460    #[doc = "Z acceleration"]
30461    pub zacc: f32,
30462    #[doc = "Angular speed around X axis"]
30463    pub xgyro: f32,
30464    #[doc = "Angular speed around Y axis"]
30465    pub ygyro: f32,
30466    #[doc = "Angular speed around Z axis"]
30467    pub zgyro: f32,
30468    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
30469    pub lat: f32,
30470    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
30471    pub lon: f32,
30472    #[doc = "Altitude"]
30473    pub alt: f32,
30474    #[doc = "Horizontal position standard deviation"]
30475    pub std_dev_horz: f32,
30476    #[doc = "Vertical position standard deviation"]
30477    pub std_dev_vert: f32,
30478    #[doc = "True velocity in north direction in earth-fixed NED frame"]
30479    pub vn: f32,
30480    #[doc = "True velocity in east direction in earth-fixed NED frame"]
30481    pub ve: f32,
30482    #[doc = "True velocity in down direction in earth-fixed NED frame"]
30483    pub vd: f32,
30484    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
30485    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30486    pub lat_int: i32,
30487    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
30488    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30489    pub lon_int: i32,
30490}
30491impl SIM_STATE_DATA {
30492    pub const ENCODED_LEN: usize = 92usize;
30493    pub const DEFAULT: Self = Self {
30494        q1: 0.0_f32,
30495        q2: 0.0_f32,
30496        q3: 0.0_f32,
30497        q4: 0.0_f32,
30498        roll: 0.0_f32,
30499        pitch: 0.0_f32,
30500        yaw: 0.0_f32,
30501        xacc: 0.0_f32,
30502        yacc: 0.0_f32,
30503        zacc: 0.0_f32,
30504        xgyro: 0.0_f32,
30505        ygyro: 0.0_f32,
30506        zgyro: 0.0_f32,
30507        lat: 0.0_f32,
30508        lon: 0.0_f32,
30509        alt: 0.0_f32,
30510        std_dev_horz: 0.0_f32,
30511        std_dev_vert: 0.0_f32,
30512        vn: 0.0_f32,
30513        ve: 0.0_f32,
30514        vd: 0.0_f32,
30515        lat_int: 0_i32,
30516        lon_int: 0_i32,
30517    };
30518    #[cfg(feature = "arbitrary")]
30519    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30520        use arbitrary::{Arbitrary, Unstructured};
30521        let mut buf = [0u8; 1024];
30522        rng.fill_bytes(&mut buf);
30523        let mut unstructured = Unstructured::new(&buf);
30524        Self::arbitrary(&mut unstructured).unwrap_or_default()
30525    }
30526}
30527impl Default for SIM_STATE_DATA {
30528    fn default() -> Self {
30529        Self::DEFAULT.clone()
30530    }
30531}
30532impl MessageData for SIM_STATE_DATA {
30533    type Message = MavMessage;
30534    const ID: u32 = 108u32;
30535    const NAME: &'static str = "SIM_STATE";
30536    const EXTRA_CRC: u8 = 32u8;
30537    const ENCODED_LEN: usize = 92usize;
30538    fn deser(
30539        _version: MavlinkVersion,
30540        __input: &[u8],
30541    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30542        let avail_len = __input.len();
30543        let mut payload_buf = [0; Self::ENCODED_LEN];
30544        let mut buf = if avail_len < Self::ENCODED_LEN {
30545            payload_buf[0..avail_len].copy_from_slice(__input);
30546            Bytes::new(&payload_buf)
30547        } else {
30548            Bytes::new(__input)
30549        };
30550        let mut __struct = Self::default();
30551        __struct.q1 = buf.get_f32_le();
30552        __struct.q2 = buf.get_f32_le();
30553        __struct.q3 = buf.get_f32_le();
30554        __struct.q4 = buf.get_f32_le();
30555        __struct.roll = buf.get_f32_le();
30556        __struct.pitch = buf.get_f32_le();
30557        __struct.yaw = buf.get_f32_le();
30558        __struct.xacc = buf.get_f32_le();
30559        __struct.yacc = buf.get_f32_le();
30560        __struct.zacc = buf.get_f32_le();
30561        __struct.xgyro = buf.get_f32_le();
30562        __struct.ygyro = buf.get_f32_le();
30563        __struct.zgyro = buf.get_f32_le();
30564        __struct.lat = buf.get_f32_le();
30565        __struct.lon = buf.get_f32_le();
30566        __struct.alt = buf.get_f32_le();
30567        __struct.std_dev_horz = buf.get_f32_le();
30568        __struct.std_dev_vert = buf.get_f32_le();
30569        __struct.vn = buf.get_f32_le();
30570        __struct.ve = buf.get_f32_le();
30571        __struct.vd = buf.get_f32_le();
30572        __struct.lat_int = buf.get_i32_le();
30573        __struct.lon_int = buf.get_i32_le();
30574        Ok(__struct)
30575    }
30576    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30577        let mut __tmp = BytesMut::new(bytes);
30578        #[allow(clippy::absurd_extreme_comparisons)]
30579        #[allow(unused_comparisons)]
30580        if __tmp.remaining() < Self::ENCODED_LEN {
30581            panic!(
30582                "buffer is too small (need {} bytes, but got {})",
30583                Self::ENCODED_LEN,
30584                __tmp.remaining(),
30585            )
30586        }
30587        __tmp.put_f32_le(self.q1);
30588        __tmp.put_f32_le(self.q2);
30589        __tmp.put_f32_le(self.q3);
30590        __tmp.put_f32_le(self.q4);
30591        __tmp.put_f32_le(self.roll);
30592        __tmp.put_f32_le(self.pitch);
30593        __tmp.put_f32_le(self.yaw);
30594        __tmp.put_f32_le(self.xacc);
30595        __tmp.put_f32_le(self.yacc);
30596        __tmp.put_f32_le(self.zacc);
30597        __tmp.put_f32_le(self.xgyro);
30598        __tmp.put_f32_le(self.ygyro);
30599        __tmp.put_f32_le(self.zgyro);
30600        __tmp.put_f32_le(self.lat);
30601        __tmp.put_f32_le(self.lon);
30602        __tmp.put_f32_le(self.alt);
30603        __tmp.put_f32_le(self.std_dev_horz);
30604        __tmp.put_f32_le(self.std_dev_vert);
30605        __tmp.put_f32_le(self.vn);
30606        __tmp.put_f32_le(self.ve);
30607        __tmp.put_f32_le(self.vd);
30608        if matches!(version, MavlinkVersion::V2) {
30609            __tmp.put_i32_le(self.lat_int);
30610            __tmp.put_i32_le(self.lon_int);
30611            let len = __tmp.len();
30612            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30613        } else {
30614            __tmp.len()
30615        }
30616    }
30617}
30618#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
30619#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
30620#[doc = ""]
30621#[doc = "ID: 370"]
30622#[derive(Debug, Clone, PartialEq)]
30623#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30625#[cfg_attr(feature = "ts", derive(TS))]
30626#[cfg_attr(feature = "ts", ts(export))]
30627pub struct SMART_BATTERY_INFO_DATA {
30628    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
30629    pub capacity_full_specification: i32,
30630    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
30631    pub capacity_full: i32,
30632    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
30633    pub cycle_count: u16,
30634    #[doc = "Battery weight. 0: field not provided."]
30635    pub weight: u16,
30636    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
30637    pub discharge_minimum_voltage: u16,
30638    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
30639    pub charging_minimum_voltage: u16,
30640    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
30641    pub resting_minimum_voltage: u16,
30642    #[doc = "Battery ID"]
30643    pub id: u8,
30644    #[doc = "Function of the battery"]
30645    pub battery_function: MavBatteryFunction,
30646    #[doc = "Type (chemistry) of the battery"]
30647    pub mavtype: MavBatteryType,
30648    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
30649    #[cfg_attr(feature = "ts", ts(type = "string"))]
30650    pub serial_number: CharArray<16>,
30651    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
30652    #[cfg_attr(feature = "ts", ts(type = "string"))]
30653    pub device_name: CharArray<50>,
30654    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
30655    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30656    pub charging_maximum_voltage: u16,
30657    #[doc = "Number of battery cells in series. 0: field not provided."]
30658    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30659    pub cells_in_series: u8,
30660    #[doc = "Maximum pack discharge current. 0: field not provided."]
30661    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30662    pub discharge_maximum_current: u32,
30663    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
30664    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30665    pub discharge_maximum_burst_current: u32,
30666    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
30667    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30668    #[cfg_attr(feature = "ts", ts(type = "string"))]
30669    pub manufacture_date: CharArray<11>,
30670}
30671impl SMART_BATTERY_INFO_DATA {
30672    pub const ENCODED_LEN: usize = 109usize;
30673    pub const DEFAULT: Self = Self {
30674        capacity_full_specification: 0_i32,
30675        capacity_full: 0_i32,
30676        cycle_count: 0_u16,
30677        weight: 0_u16,
30678        discharge_minimum_voltage: 0_u16,
30679        charging_minimum_voltage: 0_u16,
30680        resting_minimum_voltage: 0_u16,
30681        id: 0_u8,
30682        battery_function: MavBatteryFunction::DEFAULT,
30683        mavtype: MavBatteryType::DEFAULT,
30684        serial_number: CharArray::new([0_u8; 16usize]),
30685        device_name: CharArray::new([0_u8; 50usize]),
30686        charging_maximum_voltage: 0_u16,
30687        cells_in_series: 0_u8,
30688        discharge_maximum_current: 0_u32,
30689        discharge_maximum_burst_current: 0_u32,
30690        manufacture_date: CharArray::new([0_u8; 11usize]),
30691    };
30692    #[cfg(feature = "arbitrary")]
30693    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30694        use arbitrary::{Arbitrary, Unstructured};
30695        let mut buf = [0u8; 1024];
30696        rng.fill_bytes(&mut buf);
30697        let mut unstructured = Unstructured::new(&buf);
30698        Self::arbitrary(&mut unstructured).unwrap_or_default()
30699    }
30700}
30701impl Default for SMART_BATTERY_INFO_DATA {
30702    fn default() -> Self {
30703        Self::DEFAULT.clone()
30704    }
30705}
30706impl MessageData for SMART_BATTERY_INFO_DATA {
30707    type Message = MavMessage;
30708    const ID: u32 = 370u32;
30709    const NAME: &'static str = "SMART_BATTERY_INFO";
30710    const EXTRA_CRC: u8 = 75u8;
30711    const ENCODED_LEN: usize = 109usize;
30712    fn deser(
30713        _version: MavlinkVersion,
30714        __input: &[u8],
30715    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30716        let avail_len = __input.len();
30717        let mut payload_buf = [0; Self::ENCODED_LEN];
30718        let mut buf = if avail_len < Self::ENCODED_LEN {
30719            payload_buf[0..avail_len].copy_from_slice(__input);
30720            Bytes::new(&payload_buf)
30721        } else {
30722            Bytes::new(__input)
30723        };
30724        let mut __struct = Self::default();
30725        __struct.capacity_full_specification = buf.get_i32_le();
30726        __struct.capacity_full = buf.get_i32_le();
30727        __struct.cycle_count = buf.get_u16_le();
30728        __struct.weight = buf.get_u16_le();
30729        __struct.discharge_minimum_voltage = buf.get_u16_le();
30730        __struct.charging_minimum_voltage = buf.get_u16_le();
30731        __struct.resting_minimum_voltage = buf.get_u16_le();
30732        __struct.id = buf.get_u8();
30733        let tmp = buf.get_u8();
30734        __struct.battery_function =
30735            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30736                enum_type: "MavBatteryFunction",
30737                value: tmp as u64,
30738            })?;
30739        let tmp = buf.get_u8();
30740        __struct.mavtype =
30741            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30742                enum_type: "MavBatteryType",
30743                value: tmp as u64,
30744            })?;
30745        let mut tmp = [0_u8; 16usize];
30746        for v in &mut tmp {
30747            *v = buf.get_u8();
30748        }
30749        __struct.serial_number = CharArray::new(tmp);
30750        let mut tmp = [0_u8; 50usize];
30751        for v in &mut tmp {
30752            *v = buf.get_u8();
30753        }
30754        __struct.device_name = CharArray::new(tmp);
30755        __struct.charging_maximum_voltage = buf.get_u16_le();
30756        __struct.cells_in_series = buf.get_u8();
30757        __struct.discharge_maximum_current = buf.get_u32_le();
30758        __struct.discharge_maximum_burst_current = buf.get_u32_le();
30759        let mut tmp = [0_u8; 11usize];
30760        for v in &mut tmp {
30761            *v = buf.get_u8();
30762        }
30763        __struct.manufacture_date = CharArray::new(tmp);
30764        Ok(__struct)
30765    }
30766    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30767        let mut __tmp = BytesMut::new(bytes);
30768        #[allow(clippy::absurd_extreme_comparisons)]
30769        #[allow(unused_comparisons)]
30770        if __tmp.remaining() < Self::ENCODED_LEN {
30771            panic!(
30772                "buffer is too small (need {} bytes, but got {})",
30773                Self::ENCODED_LEN,
30774                __tmp.remaining(),
30775            )
30776        }
30777        __tmp.put_i32_le(self.capacity_full_specification);
30778        __tmp.put_i32_le(self.capacity_full);
30779        __tmp.put_u16_le(self.cycle_count);
30780        __tmp.put_u16_le(self.weight);
30781        __tmp.put_u16_le(self.discharge_minimum_voltage);
30782        __tmp.put_u16_le(self.charging_minimum_voltage);
30783        __tmp.put_u16_le(self.resting_minimum_voltage);
30784        __tmp.put_u8(self.id);
30785        __tmp.put_u8(self.battery_function as u8);
30786        __tmp.put_u8(self.mavtype as u8);
30787        for val in &self.serial_number {
30788            __tmp.put_u8(*val);
30789        }
30790        for val in &self.device_name {
30791            __tmp.put_u8(*val);
30792        }
30793        if matches!(version, MavlinkVersion::V2) {
30794            __tmp.put_u16_le(self.charging_maximum_voltage);
30795            __tmp.put_u8(self.cells_in_series);
30796            __tmp.put_u32_le(self.discharge_maximum_current);
30797            __tmp.put_u32_le(self.discharge_maximum_burst_current);
30798            for val in &self.manufacture_date {
30799                __tmp.put_u8(*val);
30800            }
30801            let len = __tmp.len();
30802            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30803        } else {
30804            __tmp.len()
30805        }
30806    }
30807}
30808#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
30809#[doc = ""]
30810#[doc = "ID: 253"]
30811#[derive(Debug, Clone, PartialEq)]
30812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30814#[cfg_attr(feature = "ts", derive(TS))]
30815#[cfg_attr(feature = "ts", ts(export))]
30816pub struct STATUSTEXT_DATA {
30817    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
30818    pub severity: MavSeverity,
30819    #[doc = "Status text message, without null termination character"]
30820    #[cfg_attr(feature = "ts", ts(type = "string"))]
30821    pub text: CharArray<50>,
30822    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
30823    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30824    pub id: u16,
30825    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
30826    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30827    pub chunk_seq: u8,
30828}
30829impl STATUSTEXT_DATA {
30830    pub const ENCODED_LEN: usize = 54usize;
30831    pub const DEFAULT: Self = Self {
30832        severity: MavSeverity::DEFAULT,
30833        text: CharArray::new([0_u8; 50usize]),
30834        id: 0_u16,
30835        chunk_seq: 0_u8,
30836    };
30837    #[cfg(feature = "arbitrary")]
30838    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30839        use arbitrary::{Arbitrary, Unstructured};
30840        let mut buf = [0u8; 1024];
30841        rng.fill_bytes(&mut buf);
30842        let mut unstructured = Unstructured::new(&buf);
30843        Self::arbitrary(&mut unstructured).unwrap_or_default()
30844    }
30845}
30846impl Default for STATUSTEXT_DATA {
30847    fn default() -> Self {
30848        Self::DEFAULT.clone()
30849    }
30850}
30851impl MessageData for STATUSTEXT_DATA {
30852    type Message = MavMessage;
30853    const ID: u32 = 253u32;
30854    const NAME: &'static str = "STATUSTEXT";
30855    const EXTRA_CRC: u8 = 83u8;
30856    const ENCODED_LEN: usize = 54usize;
30857    fn deser(
30858        _version: MavlinkVersion,
30859        __input: &[u8],
30860    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30861        let avail_len = __input.len();
30862        let mut payload_buf = [0; Self::ENCODED_LEN];
30863        let mut buf = if avail_len < Self::ENCODED_LEN {
30864            payload_buf[0..avail_len].copy_from_slice(__input);
30865            Bytes::new(&payload_buf)
30866        } else {
30867            Bytes::new(__input)
30868        };
30869        let mut __struct = Self::default();
30870        let tmp = buf.get_u8();
30871        __struct.severity =
30872            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30873                enum_type: "MavSeverity",
30874                value: tmp as u64,
30875            })?;
30876        let mut tmp = [0_u8; 50usize];
30877        for v in &mut tmp {
30878            *v = buf.get_u8();
30879        }
30880        __struct.text = CharArray::new(tmp);
30881        __struct.id = buf.get_u16_le();
30882        __struct.chunk_seq = buf.get_u8();
30883        Ok(__struct)
30884    }
30885    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30886        let mut __tmp = BytesMut::new(bytes);
30887        #[allow(clippy::absurd_extreme_comparisons)]
30888        #[allow(unused_comparisons)]
30889        if __tmp.remaining() < Self::ENCODED_LEN {
30890            panic!(
30891                "buffer is too small (need {} bytes, but got {})",
30892                Self::ENCODED_LEN,
30893                __tmp.remaining(),
30894            )
30895        }
30896        __tmp.put_u8(self.severity as u8);
30897        for val in &self.text {
30898            __tmp.put_u8(*val);
30899        }
30900        if matches!(version, MavlinkVersion::V2) {
30901            __tmp.put_u16_le(self.id);
30902            __tmp.put_u8(self.chunk_seq);
30903            let len = __tmp.len();
30904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30905        } else {
30906            __tmp.len()
30907        }
30908    }
30909}
30910#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
30911#[doc = ""]
30912#[doc = "ID: 261"]
30913#[derive(Debug, Clone, PartialEq)]
30914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30916#[cfg_attr(feature = "ts", derive(TS))]
30917#[cfg_attr(feature = "ts", ts(export))]
30918pub struct STORAGE_INFORMATION_DATA {
30919    #[doc = "Timestamp (time since system boot)."]
30920    pub time_boot_ms: u32,
30921    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30922    pub total_capacity: f32,
30923    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30924    pub used_capacity: f32,
30925    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30926    pub available_capacity: f32,
30927    #[doc = "Read speed."]
30928    pub read_speed: f32,
30929    #[doc = "Write speed."]
30930    pub write_speed: f32,
30931    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
30932    pub storage_id: u8,
30933    #[doc = "Number of storage devices"]
30934    pub storage_count: u8,
30935    #[doc = "Status of storage"]
30936    pub status: StorageStatus,
30937    #[doc = "Type of storage"]
30938    #[cfg_attr(feature = "serde", serde(default))]
30939    pub mavtype: StorageType,
30940    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
30941    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30942    #[cfg_attr(feature = "ts", ts(type = "string"))]
30943    pub name: CharArray<32>,
30944    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
30945    #[cfg_attr(feature = "serde", serde(default))]
30946    pub storage_usage: StorageUsageFlag,
30947}
30948impl STORAGE_INFORMATION_DATA {
30949    pub const ENCODED_LEN: usize = 61usize;
30950    pub const DEFAULT: Self = Self {
30951        time_boot_ms: 0_u32,
30952        total_capacity: 0.0_f32,
30953        used_capacity: 0.0_f32,
30954        available_capacity: 0.0_f32,
30955        read_speed: 0.0_f32,
30956        write_speed: 0.0_f32,
30957        storage_id: 0_u8,
30958        storage_count: 0_u8,
30959        status: StorageStatus::DEFAULT,
30960        mavtype: StorageType::DEFAULT,
30961        name: CharArray::new([0_u8; 32usize]),
30962        storage_usage: StorageUsageFlag::DEFAULT,
30963    };
30964    #[cfg(feature = "arbitrary")]
30965    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30966        use arbitrary::{Arbitrary, Unstructured};
30967        let mut buf = [0u8; 1024];
30968        rng.fill_bytes(&mut buf);
30969        let mut unstructured = Unstructured::new(&buf);
30970        Self::arbitrary(&mut unstructured).unwrap_or_default()
30971    }
30972}
30973impl Default for STORAGE_INFORMATION_DATA {
30974    fn default() -> Self {
30975        Self::DEFAULT.clone()
30976    }
30977}
30978impl MessageData for STORAGE_INFORMATION_DATA {
30979    type Message = MavMessage;
30980    const ID: u32 = 261u32;
30981    const NAME: &'static str = "STORAGE_INFORMATION";
30982    const EXTRA_CRC: u8 = 179u8;
30983    const ENCODED_LEN: usize = 61usize;
30984    fn deser(
30985        _version: MavlinkVersion,
30986        __input: &[u8],
30987    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30988        let avail_len = __input.len();
30989        let mut payload_buf = [0; Self::ENCODED_LEN];
30990        let mut buf = if avail_len < Self::ENCODED_LEN {
30991            payload_buf[0..avail_len].copy_from_slice(__input);
30992            Bytes::new(&payload_buf)
30993        } else {
30994            Bytes::new(__input)
30995        };
30996        let mut __struct = Self::default();
30997        __struct.time_boot_ms = buf.get_u32_le();
30998        __struct.total_capacity = buf.get_f32_le();
30999        __struct.used_capacity = buf.get_f32_le();
31000        __struct.available_capacity = buf.get_f32_le();
31001        __struct.read_speed = buf.get_f32_le();
31002        __struct.write_speed = buf.get_f32_le();
31003        __struct.storage_id = buf.get_u8();
31004        __struct.storage_count = buf.get_u8();
31005        let tmp = buf.get_u8();
31006        __struct.status =
31007            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31008                enum_type: "StorageStatus",
31009                value: tmp as u64,
31010            })?;
31011        let tmp = buf.get_u8();
31012        __struct.mavtype =
31013            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31014                enum_type: "StorageType",
31015                value: tmp as u64,
31016            })?;
31017        let mut tmp = [0_u8; 32usize];
31018        for v in &mut tmp {
31019            *v = buf.get_u8();
31020        }
31021        __struct.name = CharArray::new(tmp);
31022        let tmp = buf.get_u8();
31023        __struct.storage_usage = StorageUsageFlag::from_bits(
31024            tmp as <StorageUsageFlag as Flags>::Bits,
31025        )
31026        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31027            flag_type: "StorageUsageFlag",
31028            value: tmp as u64,
31029        })?;
31030        Ok(__struct)
31031    }
31032    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31033        let mut __tmp = BytesMut::new(bytes);
31034        #[allow(clippy::absurd_extreme_comparisons)]
31035        #[allow(unused_comparisons)]
31036        if __tmp.remaining() < Self::ENCODED_LEN {
31037            panic!(
31038                "buffer is too small (need {} bytes, but got {})",
31039                Self::ENCODED_LEN,
31040                __tmp.remaining(),
31041            )
31042        }
31043        __tmp.put_u32_le(self.time_boot_ms);
31044        __tmp.put_f32_le(self.total_capacity);
31045        __tmp.put_f32_le(self.used_capacity);
31046        __tmp.put_f32_le(self.available_capacity);
31047        __tmp.put_f32_le(self.read_speed);
31048        __tmp.put_f32_le(self.write_speed);
31049        __tmp.put_u8(self.storage_id);
31050        __tmp.put_u8(self.storage_count);
31051        __tmp.put_u8(self.status as u8);
31052        if matches!(version, MavlinkVersion::V2) {
31053            __tmp.put_u8(self.mavtype as u8);
31054            for val in &self.name {
31055                __tmp.put_u8(*val);
31056            }
31057            __tmp.put_u8(self.storage_usage.bits() as u8);
31058            let len = __tmp.len();
31059            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31060        } else {
31061            __tmp.len()
31062        }
31063    }
31064}
31065#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
31066#[doc = ""]
31067#[doc = "ID: 401"]
31068#[derive(Debug, Clone, PartialEq)]
31069#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31070#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31071#[cfg_attr(feature = "ts", derive(TS))]
31072#[cfg_attr(feature = "ts", ts(export))]
31073pub struct SUPPORTED_TUNES_DATA {
31074    #[doc = "Bitfield of supported tune formats."]
31075    pub format: TuneFormat,
31076    #[doc = "System ID"]
31077    pub target_system: u8,
31078    #[doc = "Component ID"]
31079    pub target_component: u8,
31080}
31081impl SUPPORTED_TUNES_DATA {
31082    pub const ENCODED_LEN: usize = 6usize;
31083    pub const DEFAULT: Self = Self {
31084        format: TuneFormat::DEFAULT,
31085        target_system: 0_u8,
31086        target_component: 0_u8,
31087    };
31088    #[cfg(feature = "arbitrary")]
31089    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31090        use arbitrary::{Arbitrary, Unstructured};
31091        let mut buf = [0u8; 1024];
31092        rng.fill_bytes(&mut buf);
31093        let mut unstructured = Unstructured::new(&buf);
31094        Self::arbitrary(&mut unstructured).unwrap_or_default()
31095    }
31096}
31097impl Default for SUPPORTED_TUNES_DATA {
31098    fn default() -> Self {
31099        Self::DEFAULT.clone()
31100    }
31101}
31102impl MessageData for SUPPORTED_TUNES_DATA {
31103    type Message = MavMessage;
31104    const ID: u32 = 401u32;
31105    const NAME: &'static str = "SUPPORTED_TUNES";
31106    const EXTRA_CRC: u8 = 183u8;
31107    const ENCODED_LEN: usize = 6usize;
31108    fn deser(
31109        _version: MavlinkVersion,
31110        __input: &[u8],
31111    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31112        let avail_len = __input.len();
31113        let mut payload_buf = [0; Self::ENCODED_LEN];
31114        let mut buf = if avail_len < Self::ENCODED_LEN {
31115            payload_buf[0..avail_len].copy_from_slice(__input);
31116            Bytes::new(&payload_buf)
31117        } else {
31118            Bytes::new(__input)
31119        };
31120        let mut __struct = Self::default();
31121        let tmp = buf.get_u32_le();
31122        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
31123            ::mavlink_core::error::ParserError::InvalidEnum {
31124                enum_type: "TuneFormat",
31125                value: tmp as u64,
31126            },
31127        )?;
31128        __struct.target_system = buf.get_u8();
31129        __struct.target_component = buf.get_u8();
31130        Ok(__struct)
31131    }
31132    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31133        let mut __tmp = BytesMut::new(bytes);
31134        #[allow(clippy::absurd_extreme_comparisons)]
31135        #[allow(unused_comparisons)]
31136        if __tmp.remaining() < Self::ENCODED_LEN {
31137            panic!(
31138                "buffer is too small (need {} bytes, but got {})",
31139                Self::ENCODED_LEN,
31140                __tmp.remaining(),
31141            )
31142        }
31143        __tmp.put_u32_le(self.format as u32);
31144        __tmp.put_u8(self.target_system);
31145        __tmp.put_u8(self.target_component);
31146        if matches!(version, MavlinkVersion::V2) {
31147            let len = __tmp.len();
31148            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31149        } else {
31150            __tmp.len()
31151        }
31152    }
31153}
31154#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
31155#[doc = ""]
31156#[doc = "ID: 2"]
31157#[derive(Debug, Clone, PartialEq)]
31158#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31159#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31160#[cfg_attr(feature = "ts", derive(TS))]
31161#[cfg_attr(feature = "ts", ts(export))]
31162pub struct SYSTEM_TIME_DATA {
31163    #[doc = "Timestamp (UNIX epoch time)."]
31164    pub time_unix_usec: u64,
31165    #[doc = "Timestamp (time since system boot)."]
31166    pub time_boot_ms: u32,
31167}
31168impl SYSTEM_TIME_DATA {
31169    pub const ENCODED_LEN: usize = 12usize;
31170    pub const DEFAULT: Self = Self {
31171        time_unix_usec: 0_u64,
31172        time_boot_ms: 0_u32,
31173    };
31174    #[cfg(feature = "arbitrary")]
31175    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31176        use arbitrary::{Arbitrary, Unstructured};
31177        let mut buf = [0u8; 1024];
31178        rng.fill_bytes(&mut buf);
31179        let mut unstructured = Unstructured::new(&buf);
31180        Self::arbitrary(&mut unstructured).unwrap_or_default()
31181    }
31182}
31183impl Default for SYSTEM_TIME_DATA {
31184    fn default() -> Self {
31185        Self::DEFAULT.clone()
31186    }
31187}
31188impl MessageData for SYSTEM_TIME_DATA {
31189    type Message = MavMessage;
31190    const ID: u32 = 2u32;
31191    const NAME: &'static str = "SYSTEM_TIME";
31192    const EXTRA_CRC: u8 = 137u8;
31193    const ENCODED_LEN: usize = 12usize;
31194    fn deser(
31195        _version: MavlinkVersion,
31196        __input: &[u8],
31197    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31198        let avail_len = __input.len();
31199        let mut payload_buf = [0; Self::ENCODED_LEN];
31200        let mut buf = if avail_len < Self::ENCODED_LEN {
31201            payload_buf[0..avail_len].copy_from_slice(__input);
31202            Bytes::new(&payload_buf)
31203        } else {
31204            Bytes::new(__input)
31205        };
31206        let mut __struct = Self::default();
31207        __struct.time_unix_usec = buf.get_u64_le();
31208        __struct.time_boot_ms = buf.get_u32_le();
31209        Ok(__struct)
31210    }
31211    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31212        let mut __tmp = BytesMut::new(bytes);
31213        #[allow(clippy::absurd_extreme_comparisons)]
31214        #[allow(unused_comparisons)]
31215        if __tmp.remaining() < Self::ENCODED_LEN {
31216            panic!(
31217                "buffer is too small (need {} bytes, but got {})",
31218                Self::ENCODED_LEN,
31219                __tmp.remaining(),
31220            )
31221        }
31222        __tmp.put_u64_le(self.time_unix_usec);
31223        __tmp.put_u32_le(self.time_boot_ms);
31224        if matches!(version, MavlinkVersion::V2) {
31225            let len = __tmp.len();
31226            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31227        } else {
31228            __tmp.len()
31229        }
31230    }
31231}
31232#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
31233#[doc = ""]
31234#[doc = "ID: 1"]
31235#[derive(Debug, Clone, PartialEq)]
31236#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31237#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31238#[cfg_attr(feature = "ts", derive(TS))]
31239#[cfg_attr(feature = "ts", ts(export))]
31240pub struct SYS_STATUS_DATA {
31241    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
31242    pub onboard_control_sensors_present: MavSysStatusSensor,
31243    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
31244    pub onboard_control_sensors_enabled: MavSysStatusSensor,
31245    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
31246    pub onboard_control_sensors_health: MavSysStatusSensor,
31247    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
31248    pub load: u16,
31249    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
31250    pub voltage_battery: u16,
31251    #[doc = "Battery current, -1: Current not sent by autopilot"]
31252    pub current_battery: i16,
31253    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
31254    pub drop_rate_comm: u16,
31255    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
31256    pub errors_comm: u16,
31257    #[doc = "Autopilot-specific errors"]
31258    pub errors_count1: u16,
31259    #[doc = "Autopilot-specific errors"]
31260    pub errors_count2: u16,
31261    #[doc = "Autopilot-specific errors"]
31262    pub errors_count3: u16,
31263    #[doc = "Autopilot-specific errors"]
31264    pub errors_count4: u16,
31265    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
31266    pub battery_remaining: i8,
31267    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
31268    #[cfg_attr(feature = "serde", serde(default))]
31269    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
31270    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
31271    #[cfg_attr(feature = "serde", serde(default))]
31272    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
31273    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
31274    #[cfg_attr(feature = "serde", serde(default))]
31275    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
31276}
31277impl SYS_STATUS_DATA {
31278    pub const ENCODED_LEN: usize = 43usize;
31279    pub const DEFAULT: Self = Self {
31280        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
31281        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
31282        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
31283        load: 0_u16,
31284        voltage_battery: 0_u16,
31285        current_battery: 0_i16,
31286        drop_rate_comm: 0_u16,
31287        errors_comm: 0_u16,
31288        errors_count1: 0_u16,
31289        errors_count2: 0_u16,
31290        errors_count3: 0_u16,
31291        errors_count4: 0_u16,
31292        battery_remaining: 0_i8,
31293        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
31294        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
31295        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
31296    };
31297    #[cfg(feature = "arbitrary")]
31298    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31299        use arbitrary::{Arbitrary, Unstructured};
31300        let mut buf = [0u8; 1024];
31301        rng.fill_bytes(&mut buf);
31302        let mut unstructured = Unstructured::new(&buf);
31303        Self::arbitrary(&mut unstructured).unwrap_or_default()
31304    }
31305}
31306impl Default for SYS_STATUS_DATA {
31307    fn default() -> Self {
31308        Self::DEFAULT.clone()
31309    }
31310}
31311impl MessageData for SYS_STATUS_DATA {
31312    type Message = MavMessage;
31313    const ID: u32 = 1u32;
31314    const NAME: &'static str = "SYS_STATUS";
31315    const EXTRA_CRC: u8 = 124u8;
31316    const ENCODED_LEN: usize = 43usize;
31317    fn deser(
31318        _version: MavlinkVersion,
31319        __input: &[u8],
31320    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31321        let avail_len = __input.len();
31322        let mut payload_buf = [0; Self::ENCODED_LEN];
31323        let mut buf = if avail_len < Self::ENCODED_LEN {
31324            payload_buf[0..avail_len].copy_from_slice(__input);
31325            Bytes::new(&payload_buf)
31326        } else {
31327            Bytes::new(__input)
31328        };
31329        let mut __struct = Self::default();
31330        let tmp = buf.get_u32_le();
31331        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
31332            tmp as <MavSysStatusSensor as Flags>::Bits,
31333        )
31334        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31335            flag_type: "MavSysStatusSensor",
31336            value: tmp as u64,
31337        })?;
31338        let tmp = buf.get_u32_le();
31339        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
31340            tmp as <MavSysStatusSensor as Flags>::Bits,
31341        )
31342        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31343            flag_type: "MavSysStatusSensor",
31344            value: tmp as u64,
31345        })?;
31346        let tmp = buf.get_u32_le();
31347        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
31348            tmp as <MavSysStatusSensor as Flags>::Bits,
31349        )
31350        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31351            flag_type: "MavSysStatusSensor",
31352            value: tmp as u64,
31353        })?;
31354        __struct.load = buf.get_u16_le();
31355        __struct.voltage_battery = buf.get_u16_le();
31356        __struct.current_battery = buf.get_i16_le();
31357        __struct.drop_rate_comm = buf.get_u16_le();
31358        __struct.errors_comm = buf.get_u16_le();
31359        __struct.errors_count1 = buf.get_u16_le();
31360        __struct.errors_count2 = buf.get_u16_le();
31361        __struct.errors_count3 = buf.get_u16_le();
31362        __struct.errors_count4 = buf.get_u16_le();
31363        __struct.battery_remaining = buf.get_i8();
31364        let tmp = buf.get_u32_le();
31365        __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
31366            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
31367        )
31368        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31369            flag_type: "MavSysStatusSensorExtended",
31370            value: tmp as u64,
31371        })?;
31372        let tmp = buf.get_u32_le();
31373        __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
31374            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
31375        )
31376        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31377            flag_type: "MavSysStatusSensorExtended",
31378            value: tmp as u64,
31379        })?;
31380        let tmp = buf.get_u32_le();
31381        __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
31382            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
31383        )
31384        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31385            flag_type: "MavSysStatusSensorExtended",
31386            value: tmp as u64,
31387        })?;
31388        Ok(__struct)
31389    }
31390    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31391        let mut __tmp = BytesMut::new(bytes);
31392        #[allow(clippy::absurd_extreme_comparisons)]
31393        #[allow(unused_comparisons)]
31394        if __tmp.remaining() < Self::ENCODED_LEN {
31395            panic!(
31396                "buffer is too small (need {} bytes, but got {})",
31397                Self::ENCODED_LEN,
31398                __tmp.remaining(),
31399            )
31400        }
31401        __tmp.put_u32_le(self.onboard_control_sensors_present.bits() as u32);
31402        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits() as u32);
31403        __tmp.put_u32_le(self.onboard_control_sensors_health.bits() as u32);
31404        __tmp.put_u16_le(self.load);
31405        __tmp.put_u16_le(self.voltage_battery);
31406        __tmp.put_i16_le(self.current_battery);
31407        __tmp.put_u16_le(self.drop_rate_comm);
31408        __tmp.put_u16_le(self.errors_comm);
31409        __tmp.put_u16_le(self.errors_count1);
31410        __tmp.put_u16_le(self.errors_count2);
31411        __tmp.put_u16_le(self.errors_count3);
31412        __tmp.put_u16_le(self.errors_count4);
31413        __tmp.put_i8(self.battery_remaining);
31414        if matches!(version, MavlinkVersion::V2) {
31415            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits() as u32);
31416            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits() as u32);
31417            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits() as u32);
31418            let len = __tmp.len();
31419            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31420        } else {
31421            __tmp.len()
31422        }
31423    }
31424}
31425#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
31426#[doc = ""]
31427#[doc = "ID: 135"]
31428#[derive(Debug, Clone, PartialEq)]
31429#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31430#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31431#[cfg_attr(feature = "ts", derive(TS))]
31432#[cfg_attr(feature = "ts", ts(export))]
31433pub struct TERRAIN_CHECK_DATA {
31434    #[doc = "Latitude"]
31435    pub lat: i32,
31436    #[doc = "Longitude"]
31437    pub lon: i32,
31438}
31439impl TERRAIN_CHECK_DATA {
31440    pub const ENCODED_LEN: usize = 8usize;
31441    pub const DEFAULT: Self = Self {
31442        lat: 0_i32,
31443        lon: 0_i32,
31444    };
31445    #[cfg(feature = "arbitrary")]
31446    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31447        use arbitrary::{Arbitrary, Unstructured};
31448        let mut buf = [0u8; 1024];
31449        rng.fill_bytes(&mut buf);
31450        let mut unstructured = Unstructured::new(&buf);
31451        Self::arbitrary(&mut unstructured).unwrap_or_default()
31452    }
31453}
31454impl Default for TERRAIN_CHECK_DATA {
31455    fn default() -> Self {
31456        Self::DEFAULT.clone()
31457    }
31458}
31459impl MessageData for TERRAIN_CHECK_DATA {
31460    type Message = MavMessage;
31461    const ID: u32 = 135u32;
31462    const NAME: &'static str = "TERRAIN_CHECK";
31463    const EXTRA_CRC: u8 = 203u8;
31464    const ENCODED_LEN: usize = 8usize;
31465    fn deser(
31466        _version: MavlinkVersion,
31467        __input: &[u8],
31468    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31469        let avail_len = __input.len();
31470        let mut payload_buf = [0; Self::ENCODED_LEN];
31471        let mut buf = if avail_len < Self::ENCODED_LEN {
31472            payload_buf[0..avail_len].copy_from_slice(__input);
31473            Bytes::new(&payload_buf)
31474        } else {
31475            Bytes::new(__input)
31476        };
31477        let mut __struct = Self::default();
31478        __struct.lat = buf.get_i32_le();
31479        __struct.lon = buf.get_i32_le();
31480        Ok(__struct)
31481    }
31482    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31483        let mut __tmp = BytesMut::new(bytes);
31484        #[allow(clippy::absurd_extreme_comparisons)]
31485        #[allow(unused_comparisons)]
31486        if __tmp.remaining() < Self::ENCODED_LEN {
31487            panic!(
31488                "buffer is too small (need {} bytes, but got {})",
31489                Self::ENCODED_LEN,
31490                __tmp.remaining(),
31491            )
31492        }
31493        __tmp.put_i32_le(self.lat);
31494        __tmp.put_i32_le(self.lon);
31495        if matches!(version, MavlinkVersion::V2) {
31496            let len = __tmp.len();
31497            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31498        } else {
31499            __tmp.len()
31500        }
31501    }
31502}
31503#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31504#[doc = ""]
31505#[doc = "ID: 134"]
31506#[derive(Debug, Clone, PartialEq)]
31507#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31508#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31509#[cfg_attr(feature = "ts", derive(TS))]
31510#[cfg_attr(feature = "ts", ts(export))]
31511pub struct TERRAIN_DATA_DATA {
31512    #[doc = "Latitude of SW corner of first grid"]
31513    pub lat: i32,
31514    #[doc = "Longitude of SW corner of first grid"]
31515    pub lon: i32,
31516    #[doc = "Grid spacing"]
31517    pub grid_spacing: u16,
31518    #[doc = "Terrain data MSL"]
31519    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31520    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31521    pub data: [i16; 16],
31522    #[doc = "bit within the terrain request mask"]
31523    pub gridbit: u8,
31524}
31525impl TERRAIN_DATA_DATA {
31526    pub const ENCODED_LEN: usize = 43usize;
31527    pub const DEFAULT: Self = Self {
31528        lat: 0_i32,
31529        lon: 0_i32,
31530        grid_spacing: 0_u16,
31531        data: [0_i16; 16usize],
31532        gridbit: 0_u8,
31533    };
31534    #[cfg(feature = "arbitrary")]
31535    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31536        use arbitrary::{Arbitrary, Unstructured};
31537        let mut buf = [0u8; 1024];
31538        rng.fill_bytes(&mut buf);
31539        let mut unstructured = Unstructured::new(&buf);
31540        Self::arbitrary(&mut unstructured).unwrap_or_default()
31541    }
31542}
31543impl Default for TERRAIN_DATA_DATA {
31544    fn default() -> Self {
31545        Self::DEFAULT.clone()
31546    }
31547}
31548impl MessageData for TERRAIN_DATA_DATA {
31549    type Message = MavMessage;
31550    const ID: u32 = 134u32;
31551    const NAME: &'static str = "TERRAIN_DATA";
31552    const EXTRA_CRC: u8 = 229u8;
31553    const ENCODED_LEN: usize = 43usize;
31554    fn deser(
31555        _version: MavlinkVersion,
31556        __input: &[u8],
31557    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31558        let avail_len = __input.len();
31559        let mut payload_buf = [0; Self::ENCODED_LEN];
31560        let mut buf = if avail_len < Self::ENCODED_LEN {
31561            payload_buf[0..avail_len].copy_from_slice(__input);
31562            Bytes::new(&payload_buf)
31563        } else {
31564            Bytes::new(__input)
31565        };
31566        let mut __struct = Self::default();
31567        __struct.lat = buf.get_i32_le();
31568        __struct.lon = buf.get_i32_le();
31569        __struct.grid_spacing = buf.get_u16_le();
31570        for v in &mut __struct.data {
31571            let val = buf.get_i16_le();
31572            *v = val;
31573        }
31574        __struct.gridbit = buf.get_u8();
31575        Ok(__struct)
31576    }
31577    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31578        let mut __tmp = BytesMut::new(bytes);
31579        #[allow(clippy::absurd_extreme_comparisons)]
31580        #[allow(unused_comparisons)]
31581        if __tmp.remaining() < Self::ENCODED_LEN {
31582            panic!(
31583                "buffer is too small (need {} bytes, but got {})",
31584                Self::ENCODED_LEN,
31585                __tmp.remaining(),
31586            )
31587        }
31588        __tmp.put_i32_le(self.lat);
31589        __tmp.put_i32_le(self.lon);
31590        __tmp.put_u16_le(self.grid_spacing);
31591        for val in &self.data {
31592            __tmp.put_i16_le(*val);
31593        }
31594        __tmp.put_u8(self.gridbit);
31595        if matches!(version, MavlinkVersion::V2) {
31596            let len = __tmp.len();
31597            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31598        } else {
31599            __tmp.len()
31600        }
31601    }
31602}
31603#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31604#[doc = ""]
31605#[doc = "ID: 136"]
31606#[derive(Debug, Clone, PartialEq)]
31607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31609#[cfg_attr(feature = "ts", derive(TS))]
31610#[cfg_attr(feature = "ts", ts(export))]
31611pub struct TERRAIN_REPORT_DATA {
31612    #[doc = "Latitude"]
31613    pub lat: i32,
31614    #[doc = "Longitude"]
31615    pub lon: i32,
31616    #[doc = "Terrain height MSL"]
31617    pub terrain_height: f32,
31618    #[doc = "Current vehicle height above lat/lon terrain height"]
31619    pub current_height: f32,
31620    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
31621    pub spacing: u16,
31622    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
31623    pub pending: u16,
31624    #[doc = "Number of 4x4 terrain blocks in memory"]
31625    pub loaded: u16,
31626}
31627impl TERRAIN_REPORT_DATA {
31628    pub const ENCODED_LEN: usize = 22usize;
31629    pub const DEFAULT: Self = Self {
31630        lat: 0_i32,
31631        lon: 0_i32,
31632        terrain_height: 0.0_f32,
31633        current_height: 0.0_f32,
31634        spacing: 0_u16,
31635        pending: 0_u16,
31636        loaded: 0_u16,
31637    };
31638    #[cfg(feature = "arbitrary")]
31639    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31640        use arbitrary::{Arbitrary, Unstructured};
31641        let mut buf = [0u8; 1024];
31642        rng.fill_bytes(&mut buf);
31643        let mut unstructured = Unstructured::new(&buf);
31644        Self::arbitrary(&mut unstructured).unwrap_or_default()
31645    }
31646}
31647impl Default for TERRAIN_REPORT_DATA {
31648    fn default() -> Self {
31649        Self::DEFAULT.clone()
31650    }
31651}
31652impl MessageData for TERRAIN_REPORT_DATA {
31653    type Message = MavMessage;
31654    const ID: u32 = 136u32;
31655    const NAME: &'static str = "TERRAIN_REPORT";
31656    const EXTRA_CRC: u8 = 1u8;
31657    const ENCODED_LEN: usize = 22usize;
31658    fn deser(
31659        _version: MavlinkVersion,
31660        __input: &[u8],
31661    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31662        let avail_len = __input.len();
31663        let mut payload_buf = [0; Self::ENCODED_LEN];
31664        let mut buf = if avail_len < Self::ENCODED_LEN {
31665            payload_buf[0..avail_len].copy_from_slice(__input);
31666            Bytes::new(&payload_buf)
31667        } else {
31668            Bytes::new(__input)
31669        };
31670        let mut __struct = Self::default();
31671        __struct.lat = buf.get_i32_le();
31672        __struct.lon = buf.get_i32_le();
31673        __struct.terrain_height = buf.get_f32_le();
31674        __struct.current_height = buf.get_f32_le();
31675        __struct.spacing = buf.get_u16_le();
31676        __struct.pending = buf.get_u16_le();
31677        __struct.loaded = buf.get_u16_le();
31678        Ok(__struct)
31679    }
31680    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31681        let mut __tmp = BytesMut::new(bytes);
31682        #[allow(clippy::absurd_extreme_comparisons)]
31683        #[allow(unused_comparisons)]
31684        if __tmp.remaining() < Self::ENCODED_LEN {
31685            panic!(
31686                "buffer is too small (need {} bytes, but got {})",
31687                Self::ENCODED_LEN,
31688                __tmp.remaining(),
31689            )
31690        }
31691        __tmp.put_i32_le(self.lat);
31692        __tmp.put_i32_le(self.lon);
31693        __tmp.put_f32_le(self.terrain_height);
31694        __tmp.put_f32_le(self.current_height);
31695        __tmp.put_u16_le(self.spacing);
31696        __tmp.put_u16_le(self.pending);
31697        __tmp.put_u16_le(self.loaded);
31698        if matches!(version, MavlinkVersion::V2) {
31699            let len = __tmp.len();
31700            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31701        } else {
31702            __tmp.len()
31703        }
31704    }
31705}
31706#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31707#[doc = ""]
31708#[doc = "ID: 133"]
31709#[derive(Debug, Clone, PartialEq)]
31710#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31712#[cfg_attr(feature = "ts", derive(TS))]
31713#[cfg_attr(feature = "ts", ts(export))]
31714pub struct TERRAIN_REQUEST_DATA {
31715    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
31716    pub mask: u64,
31717    #[doc = "Latitude of SW corner of first grid"]
31718    pub lat: i32,
31719    #[doc = "Longitude of SW corner of first grid"]
31720    pub lon: i32,
31721    #[doc = "Grid spacing"]
31722    pub grid_spacing: u16,
31723}
31724impl TERRAIN_REQUEST_DATA {
31725    pub const ENCODED_LEN: usize = 18usize;
31726    pub const DEFAULT: Self = Self {
31727        mask: 0_u64,
31728        lat: 0_i32,
31729        lon: 0_i32,
31730        grid_spacing: 0_u16,
31731    };
31732    #[cfg(feature = "arbitrary")]
31733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31734        use arbitrary::{Arbitrary, Unstructured};
31735        let mut buf = [0u8; 1024];
31736        rng.fill_bytes(&mut buf);
31737        let mut unstructured = Unstructured::new(&buf);
31738        Self::arbitrary(&mut unstructured).unwrap_or_default()
31739    }
31740}
31741impl Default for TERRAIN_REQUEST_DATA {
31742    fn default() -> Self {
31743        Self::DEFAULT.clone()
31744    }
31745}
31746impl MessageData for TERRAIN_REQUEST_DATA {
31747    type Message = MavMessage;
31748    const ID: u32 = 133u32;
31749    const NAME: &'static str = "TERRAIN_REQUEST";
31750    const EXTRA_CRC: u8 = 6u8;
31751    const ENCODED_LEN: usize = 18usize;
31752    fn deser(
31753        _version: MavlinkVersion,
31754        __input: &[u8],
31755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31756        let avail_len = __input.len();
31757        let mut payload_buf = [0; Self::ENCODED_LEN];
31758        let mut buf = if avail_len < Self::ENCODED_LEN {
31759            payload_buf[0..avail_len].copy_from_slice(__input);
31760            Bytes::new(&payload_buf)
31761        } else {
31762            Bytes::new(__input)
31763        };
31764        let mut __struct = Self::default();
31765        __struct.mask = buf.get_u64_le();
31766        __struct.lat = buf.get_i32_le();
31767        __struct.lon = buf.get_i32_le();
31768        __struct.grid_spacing = buf.get_u16_le();
31769        Ok(__struct)
31770    }
31771    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31772        let mut __tmp = BytesMut::new(bytes);
31773        #[allow(clippy::absurd_extreme_comparisons)]
31774        #[allow(unused_comparisons)]
31775        if __tmp.remaining() < Self::ENCODED_LEN {
31776            panic!(
31777                "buffer is too small (need {} bytes, but got {})",
31778                Self::ENCODED_LEN,
31779                __tmp.remaining(),
31780            )
31781        }
31782        __tmp.put_u64_le(self.mask);
31783        __tmp.put_i32_le(self.lat);
31784        __tmp.put_i32_le(self.lon);
31785        __tmp.put_u16_le(self.grid_spacing);
31786        if matches!(version, MavlinkVersion::V2) {
31787            let len = __tmp.len();
31788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31789        } else {
31790            __tmp.len()
31791        }
31792    }
31793}
31794#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
31795#[doc = ""]
31796#[doc = "ID: 111"]
31797#[derive(Debug, Clone, PartialEq)]
31798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31800#[cfg_attr(feature = "ts", derive(TS))]
31801#[cfg_attr(feature = "ts", ts(export))]
31802pub struct TIMESYNC_DATA {
31803    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
31804    pub tc1: i64,
31805    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
31806    pub ts1: i64,
31807    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
31808    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31809    pub target_system: u8,
31810    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
31811    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31812    pub target_component: u8,
31813}
31814impl TIMESYNC_DATA {
31815    pub const ENCODED_LEN: usize = 18usize;
31816    pub const DEFAULT: Self = Self {
31817        tc1: 0_i64,
31818        ts1: 0_i64,
31819        target_system: 0_u8,
31820        target_component: 0_u8,
31821    };
31822    #[cfg(feature = "arbitrary")]
31823    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31824        use arbitrary::{Arbitrary, Unstructured};
31825        let mut buf = [0u8; 1024];
31826        rng.fill_bytes(&mut buf);
31827        let mut unstructured = Unstructured::new(&buf);
31828        Self::arbitrary(&mut unstructured).unwrap_or_default()
31829    }
31830}
31831impl Default for TIMESYNC_DATA {
31832    fn default() -> Self {
31833        Self::DEFAULT.clone()
31834    }
31835}
31836impl MessageData for TIMESYNC_DATA {
31837    type Message = MavMessage;
31838    const ID: u32 = 111u32;
31839    const NAME: &'static str = "TIMESYNC";
31840    const EXTRA_CRC: u8 = 34u8;
31841    const ENCODED_LEN: usize = 18usize;
31842    fn deser(
31843        _version: MavlinkVersion,
31844        __input: &[u8],
31845    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31846        let avail_len = __input.len();
31847        let mut payload_buf = [0; Self::ENCODED_LEN];
31848        let mut buf = if avail_len < Self::ENCODED_LEN {
31849            payload_buf[0..avail_len].copy_from_slice(__input);
31850            Bytes::new(&payload_buf)
31851        } else {
31852            Bytes::new(__input)
31853        };
31854        let mut __struct = Self::default();
31855        __struct.tc1 = buf.get_i64_le();
31856        __struct.ts1 = buf.get_i64_le();
31857        __struct.target_system = buf.get_u8();
31858        __struct.target_component = buf.get_u8();
31859        Ok(__struct)
31860    }
31861    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31862        let mut __tmp = BytesMut::new(bytes);
31863        #[allow(clippy::absurd_extreme_comparisons)]
31864        #[allow(unused_comparisons)]
31865        if __tmp.remaining() < Self::ENCODED_LEN {
31866            panic!(
31867                "buffer is too small (need {} bytes, but got {})",
31868                Self::ENCODED_LEN,
31869                __tmp.remaining(),
31870            )
31871        }
31872        __tmp.put_i64_le(self.tc1);
31873        __tmp.put_i64_le(self.ts1);
31874        if matches!(version, MavlinkVersion::V2) {
31875            __tmp.put_u8(self.target_system);
31876            __tmp.put_u8(self.target_component);
31877            let len = __tmp.len();
31878            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31879        } else {
31880            __tmp.len()
31881        }
31882    }
31883}
31884#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
31885#[doc = ""]
31886#[doc = "ID: 380"]
31887#[derive(Debug, Clone, PartialEq)]
31888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31889#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31890#[cfg_attr(feature = "ts", derive(TS))]
31891#[cfg_attr(feature = "ts", ts(export))]
31892pub struct TIME_ESTIMATE_TO_TARGET_DATA {
31893    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
31894    pub safe_return: i32,
31895    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
31896    pub land: i32,
31897    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
31898    pub mission_next_item: i32,
31899    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
31900    pub mission_end: i32,
31901    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
31902    pub commanded_action: i32,
31903}
31904impl TIME_ESTIMATE_TO_TARGET_DATA {
31905    pub const ENCODED_LEN: usize = 20usize;
31906    pub const DEFAULT: Self = Self {
31907        safe_return: 0_i32,
31908        land: 0_i32,
31909        mission_next_item: 0_i32,
31910        mission_end: 0_i32,
31911        commanded_action: 0_i32,
31912    };
31913    #[cfg(feature = "arbitrary")]
31914    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31915        use arbitrary::{Arbitrary, Unstructured};
31916        let mut buf = [0u8; 1024];
31917        rng.fill_bytes(&mut buf);
31918        let mut unstructured = Unstructured::new(&buf);
31919        Self::arbitrary(&mut unstructured).unwrap_or_default()
31920    }
31921}
31922impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
31923    fn default() -> Self {
31924        Self::DEFAULT.clone()
31925    }
31926}
31927impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
31928    type Message = MavMessage;
31929    const ID: u32 = 380u32;
31930    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
31931    const EXTRA_CRC: u8 = 232u8;
31932    const ENCODED_LEN: usize = 20usize;
31933    fn deser(
31934        _version: MavlinkVersion,
31935        __input: &[u8],
31936    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31937        let avail_len = __input.len();
31938        let mut payload_buf = [0; Self::ENCODED_LEN];
31939        let mut buf = if avail_len < Self::ENCODED_LEN {
31940            payload_buf[0..avail_len].copy_from_slice(__input);
31941            Bytes::new(&payload_buf)
31942        } else {
31943            Bytes::new(__input)
31944        };
31945        let mut __struct = Self::default();
31946        __struct.safe_return = buf.get_i32_le();
31947        __struct.land = buf.get_i32_le();
31948        __struct.mission_next_item = buf.get_i32_le();
31949        __struct.mission_end = buf.get_i32_le();
31950        __struct.commanded_action = buf.get_i32_le();
31951        Ok(__struct)
31952    }
31953    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31954        let mut __tmp = BytesMut::new(bytes);
31955        #[allow(clippy::absurd_extreme_comparisons)]
31956        #[allow(unused_comparisons)]
31957        if __tmp.remaining() < Self::ENCODED_LEN {
31958            panic!(
31959                "buffer is too small (need {} bytes, but got {})",
31960                Self::ENCODED_LEN,
31961                __tmp.remaining(),
31962            )
31963        }
31964        __tmp.put_i32_le(self.safe_return);
31965        __tmp.put_i32_le(self.land);
31966        __tmp.put_i32_le(self.mission_next_item);
31967        __tmp.put_i32_le(self.mission_end);
31968        __tmp.put_i32_le(self.commanded_action);
31969        if matches!(version, MavlinkVersion::V2) {
31970            let len = __tmp.len();
31971            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31972        } else {
31973            __tmp.len()
31974        }
31975    }
31976}
31977#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
31978#[doc = ""]
31979#[doc = "ID: 333"]
31980#[derive(Debug, Clone, PartialEq)]
31981#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31982#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31983#[cfg_attr(feature = "ts", derive(TS))]
31984#[cfg_attr(feature = "ts", ts(export))]
31985pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31986    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31987    pub time_usec: u64,
31988    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
31989    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31990    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31991    pub pos_x: [f32; 5],
31992    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
31993    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31994    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31995    pub pos_y: [f32; 5],
31996    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
31997    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31998    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31999    pub pos_z: [f32; 5],
32000    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
32001    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32002    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32003    pub delta: [f32; 5],
32004    #[doc = "Yaw. Set to NaN for unchanged"]
32005    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32006    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32007    pub pos_yaw: [f32; 5],
32008    #[doc = "Number of valid control points (up-to 5 points are possible)"]
32009    pub valid_points: u8,
32010}
32011impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32012    pub const ENCODED_LEN: usize = 109usize;
32013    pub const DEFAULT: Self = Self {
32014        time_usec: 0_u64,
32015        pos_x: [0.0_f32; 5usize],
32016        pos_y: [0.0_f32; 5usize],
32017        pos_z: [0.0_f32; 5usize],
32018        delta: [0.0_f32; 5usize],
32019        pos_yaw: [0.0_f32; 5usize],
32020        valid_points: 0_u8,
32021    };
32022    #[cfg(feature = "arbitrary")]
32023    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32024        use arbitrary::{Arbitrary, Unstructured};
32025        let mut buf = [0u8; 1024];
32026        rng.fill_bytes(&mut buf);
32027        let mut unstructured = Unstructured::new(&buf);
32028        Self::arbitrary(&mut unstructured).unwrap_or_default()
32029    }
32030}
32031impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32032    fn default() -> Self {
32033        Self::DEFAULT.clone()
32034    }
32035}
32036impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32037    type Message = MavMessage;
32038    const ID: u32 = 333u32;
32039    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
32040    const EXTRA_CRC: u8 = 231u8;
32041    const ENCODED_LEN: usize = 109usize;
32042    fn deser(
32043        _version: MavlinkVersion,
32044        __input: &[u8],
32045    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32046        let avail_len = __input.len();
32047        let mut payload_buf = [0; Self::ENCODED_LEN];
32048        let mut buf = if avail_len < Self::ENCODED_LEN {
32049            payload_buf[0..avail_len].copy_from_slice(__input);
32050            Bytes::new(&payload_buf)
32051        } else {
32052            Bytes::new(__input)
32053        };
32054        let mut __struct = Self::default();
32055        __struct.time_usec = buf.get_u64_le();
32056        for v in &mut __struct.pos_x {
32057            let val = buf.get_f32_le();
32058            *v = val;
32059        }
32060        for v in &mut __struct.pos_y {
32061            let val = buf.get_f32_le();
32062            *v = val;
32063        }
32064        for v in &mut __struct.pos_z {
32065            let val = buf.get_f32_le();
32066            *v = val;
32067        }
32068        for v in &mut __struct.delta {
32069            let val = buf.get_f32_le();
32070            *v = val;
32071        }
32072        for v in &mut __struct.pos_yaw {
32073            let val = buf.get_f32_le();
32074            *v = val;
32075        }
32076        __struct.valid_points = buf.get_u8();
32077        Ok(__struct)
32078    }
32079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32080        let mut __tmp = BytesMut::new(bytes);
32081        #[allow(clippy::absurd_extreme_comparisons)]
32082        #[allow(unused_comparisons)]
32083        if __tmp.remaining() < Self::ENCODED_LEN {
32084            panic!(
32085                "buffer is too small (need {} bytes, but got {})",
32086                Self::ENCODED_LEN,
32087                __tmp.remaining(),
32088            )
32089        }
32090        __tmp.put_u64_le(self.time_usec);
32091        for val in &self.pos_x {
32092            __tmp.put_f32_le(*val);
32093        }
32094        for val in &self.pos_y {
32095            __tmp.put_f32_le(*val);
32096        }
32097        for val in &self.pos_z {
32098            __tmp.put_f32_le(*val);
32099        }
32100        for val in &self.delta {
32101            __tmp.put_f32_le(*val);
32102        }
32103        for val in &self.pos_yaw {
32104            __tmp.put_f32_le(*val);
32105        }
32106        __tmp.put_u8(self.valid_points);
32107        if matches!(version, MavlinkVersion::V2) {
32108            let len = __tmp.len();
32109            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32110        } else {
32111            __tmp.len()
32112        }
32113    }
32114}
32115#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
32116#[doc = ""]
32117#[doc = "ID: 332"]
32118#[derive(Debug, Clone, PartialEq)]
32119#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32120#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32121#[cfg_attr(feature = "ts", derive(TS))]
32122#[cfg_attr(feature = "ts", ts(export))]
32123pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32124    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32125    pub time_usec: u64,
32126    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
32127    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32128    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32129    pub pos_x: [f32; 5],
32130    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
32131    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32132    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32133    pub pos_y: [f32; 5],
32134    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
32135    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32136    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32137    pub pos_z: [f32; 5],
32138    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
32139    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32140    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32141    pub vel_x: [f32; 5],
32142    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
32143    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32144    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32145    pub vel_y: [f32; 5],
32146    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
32147    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32148    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32149    pub vel_z: [f32; 5],
32150    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
32151    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32152    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32153    pub acc_x: [f32; 5],
32154    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
32155    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32156    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32157    pub acc_y: [f32; 5],
32158    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
32159    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32160    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32161    pub acc_z: [f32; 5],
32162    #[doc = "Yaw angle, set to NaN if not being used"]
32163    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32164    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32165    pub pos_yaw: [f32; 5],
32166    #[doc = "Yaw rate, set to NaN if not being used"]
32167    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32168    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32169    pub vel_yaw: [f32; 5],
32170    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
32171    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32172    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32173    pub command: [u16; 5],
32174    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
32175    pub valid_points: u8,
32176}
32177impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32178    pub const ENCODED_LEN: usize = 239usize;
32179    pub const DEFAULT: Self = Self {
32180        time_usec: 0_u64,
32181        pos_x: [0.0_f32; 5usize],
32182        pos_y: [0.0_f32; 5usize],
32183        pos_z: [0.0_f32; 5usize],
32184        vel_x: [0.0_f32; 5usize],
32185        vel_y: [0.0_f32; 5usize],
32186        vel_z: [0.0_f32; 5usize],
32187        acc_x: [0.0_f32; 5usize],
32188        acc_y: [0.0_f32; 5usize],
32189        acc_z: [0.0_f32; 5usize],
32190        pos_yaw: [0.0_f32; 5usize],
32191        vel_yaw: [0.0_f32; 5usize],
32192        command: [0_u16; 5usize],
32193        valid_points: 0_u8,
32194    };
32195    #[cfg(feature = "arbitrary")]
32196    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32197        use arbitrary::{Arbitrary, Unstructured};
32198        let mut buf = [0u8; 1024];
32199        rng.fill_bytes(&mut buf);
32200        let mut unstructured = Unstructured::new(&buf);
32201        Self::arbitrary(&mut unstructured).unwrap_or_default()
32202    }
32203}
32204impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32205    fn default() -> Self {
32206        Self::DEFAULT.clone()
32207    }
32208}
32209impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32210    type Message = MavMessage;
32211    const ID: u32 = 332u32;
32212    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
32213    const EXTRA_CRC: u8 = 236u8;
32214    const ENCODED_LEN: usize = 239usize;
32215    fn deser(
32216        _version: MavlinkVersion,
32217        __input: &[u8],
32218    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32219        let avail_len = __input.len();
32220        let mut payload_buf = [0; Self::ENCODED_LEN];
32221        let mut buf = if avail_len < Self::ENCODED_LEN {
32222            payload_buf[0..avail_len].copy_from_slice(__input);
32223            Bytes::new(&payload_buf)
32224        } else {
32225            Bytes::new(__input)
32226        };
32227        let mut __struct = Self::default();
32228        __struct.time_usec = buf.get_u64_le();
32229        for v in &mut __struct.pos_x {
32230            let val = buf.get_f32_le();
32231            *v = val;
32232        }
32233        for v in &mut __struct.pos_y {
32234            let val = buf.get_f32_le();
32235            *v = val;
32236        }
32237        for v in &mut __struct.pos_z {
32238            let val = buf.get_f32_le();
32239            *v = val;
32240        }
32241        for v in &mut __struct.vel_x {
32242            let val = buf.get_f32_le();
32243            *v = val;
32244        }
32245        for v in &mut __struct.vel_y {
32246            let val = buf.get_f32_le();
32247            *v = val;
32248        }
32249        for v in &mut __struct.vel_z {
32250            let val = buf.get_f32_le();
32251            *v = val;
32252        }
32253        for v in &mut __struct.acc_x {
32254            let val = buf.get_f32_le();
32255            *v = val;
32256        }
32257        for v in &mut __struct.acc_y {
32258            let val = buf.get_f32_le();
32259            *v = val;
32260        }
32261        for v in &mut __struct.acc_z {
32262            let val = buf.get_f32_le();
32263            *v = val;
32264        }
32265        for v in &mut __struct.pos_yaw {
32266            let val = buf.get_f32_le();
32267            *v = val;
32268        }
32269        for v in &mut __struct.vel_yaw {
32270            let val = buf.get_f32_le();
32271            *v = val;
32272        }
32273        for v in &mut __struct.command {
32274            let val = buf.get_u16_le();
32275            *v = val;
32276        }
32277        __struct.valid_points = buf.get_u8();
32278        Ok(__struct)
32279    }
32280    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32281        let mut __tmp = BytesMut::new(bytes);
32282        #[allow(clippy::absurd_extreme_comparisons)]
32283        #[allow(unused_comparisons)]
32284        if __tmp.remaining() < Self::ENCODED_LEN {
32285            panic!(
32286                "buffer is too small (need {} bytes, but got {})",
32287                Self::ENCODED_LEN,
32288                __tmp.remaining(),
32289            )
32290        }
32291        __tmp.put_u64_le(self.time_usec);
32292        for val in &self.pos_x {
32293            __tmp.put_f32_le(*val);
32294        }
32295        for val in &self.pos_y {
32296            __tmp.put_f32_le(*val);
32297        }
32298        for val in &self.pos_z {
32299            __tmp.put_f32_le(*val);
32300        }
32301        for val in &self.vel_x {
32302            __tmp.put_f32_le(*val);
32303        }
32304        for val in &self.vel_y {
32305            __tmp.put_f32_le(*val);
32306        }
32307        for val in &self.vel_z {
32308            __tmp.put_f32_le(*val);
32309        }
32310        for val in &self.acc_x {
32311            __tmp.put_f32_le(*val);
32312        }
32313        for val in &self.acc_y {
32314            __tmp.put_f32_le(*val);
32315        }
32316        for val in &self.acc_z {
32317            __tmp.put_f32_le(*val);
32318        }
32319        for val in &self.pos_yaw {
32320            __tmp.put_f32_le(*val);
32321        }
32322        for val in &self.vel_yaw {
32323            __tmp.put_f32_le(*val);
32324        }
32325        for val in &self.command {
32326            __tmp.put_u16_le(*val);
32327        }
32328        __tmp.put_u8(self.valid_points);
32329        if matches!(version, MavlinkVersion::V2) {
32330            let len = __tmp.len();
32331            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32332        } else {
32333            __tmp.len()
32334        }
32335    }
32336}
32337#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
32338#[doc = ""]
32339#[doc = "ID: 385"]
32340#[derive(Debug, Clone, PartialEq)]
32341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32342#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32343#[cfg_attr(feature = "ts", derive(TS))]
32344#[cfg_attr(feature = "ts", ts(export))]
32345pub struct TUNNEL_DATA {
32346    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32347    pub payload_type: MavTunnelPayloadType,
32348    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
32349    pub target_system: u8,
32350    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
32351    pub target_component: u8,
32352    #[doc = "Length of the data transported in payload"]
32353    pub payload_length: u8,
32354    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
32355    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32356    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32357    pub payload: [u8; 128],
32358}
32359impl TUNNEL_DATA {
32360    pub const ENCODED_LEN: usize = 133usize;
32361    pub const DEFAULT: Self = Self {
32362        payload_type: MavTunnelPayloadType::DEFAULT,
32363        target_system: 0_u8,
32364        target_component: 0_u8,
32365        payload_length: 0_u8,
32366        payload: [0_u8; 128usize],
32367    };
32368    #[cfg(feature = "arbitrary")]
32369    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32370        use arbitrary::{Arbitrary, Unstructured};
32371        let mut buf = [0u8; 1024];
32372        rng.fill_bytes(&mut buf);
32373        let mut unstructured = Unstructured::new(&buf);
32374        Self::arbitrary(&mut unstructured).unwrap_or_default()
32375    }
32376}
32377impl Default for TUNNEL_DATA {
32378    fn default() -> Self {
32379        Self::DEFAULT.clone()
32380    }
32381}
32382impl MessageData for TUNNEL_DATA {
32383    type Message = MavMessage;
32384    const ID: u32 = 385u32;
32385    const NAME: &'static str = "TUNNEL";
32386    const EXTRA_CRC: u8 = 147u8;
32387    const ENCODED_LEN: usize = 133usize;
32388    fn deser(
32389        _version: MavlinkVersion,
32390        __input: &[u8],
32391    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32392        let avail_len = __input.len();
32393        let mut payload_buf = [0; Self::ENCODED_LEN];
32394        let mut buf = if avail_len < Self::ENCODED_LEN {
32395            payload_buf[0..avail_len].copy_from_slice(__input);
32396            Bytes::new(&payload_buf)
32397        } else {
32398            Bytes::new(__input)
32399        };
32400        let mut __struct = Self::default();
32401        let tmp = buf.get_u16_le();
32402        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
32403            ::mavlink_core::error::ParserError::InvalidEnum {
32404                enum_type: "MavTunnelPayloadType",
32405                value: tmp as u64,
32406            },
32407        )?;
32408        __struct.target_system = buf.get_u8();
32409        __struct.target_component = buf.get_u8();
32410        __struct.payload_length = buf.get_u8();
32411        for v in &mut __struct.payload {
32412            let val = buf.get_u8();
32413            *v = val;
32414        }
32415        Ok(__struct)
32416    }
32417    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32418        let mut __tmp = BytesMut::new(bytes);
32419        #[allow(clippy::absurd_extreme_comparisons)]
32420        #[allow(unused_comparisons)]
32421        if __tmp.remaining() < Self::ENCODED_LEN {
32422            panic!(
32423                "buffer is too small (need {} bytes, but got {})",
32424                Self::ENCODED_LEN,
32425                __tmp.remaining(),
32426            )
32427        }
32428        __tmp.put_u16_le(self.payload_type as u16);
32429        __tmp.put_u8(self.target_system);
32430        __tmp.put_u8(self.target_component);
32431        __tmp.put_u8(self.payload_length);
32432        for val in &self.payload {
32433            __tmp.put_u8(*val);
32434        }
32435        if matches!(version, MavlinkVersion::V2) {
32436            let len = __tmp.len();
32437            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32438        } else {
32439            __tmp.len()
32440        }
32441    }
32442}
32443#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
32444#[doc = ""]
32445#[doc = "ID: 311"]
32446#[derive(Debug, Clone, PartialEq)]
32447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32448#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32449#[cfg_attr(feature = "ts", derive(TS))]
32450#[cfg_attr(feature = "ts", ts(export))]
32451pub struct UAVCAN_NODE_INFO_DATA {
32452    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32453    pub time_usec: u64,
32454    #[doc = "Time since the start-up of the node."]
32455    pub uptime_sec: u32,
32456    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
32457    pub sw_vcs_commit: u32,
32458    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
32459    #[cfg_attr(feature = "ts", ts(type = "string"))]
32460    pub name: CharArray<80>,
32461    #[doc = "Hardware major version number."]
32462    pub hw_version_major: u8,
32463    #[doc = "Hardware minor version number."]
32464    pub hw_version_minor: u8,
32465    #[doc = "Hardware unique 128-bit ID."]
32466    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32467    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32468    pub hw_unique_id: [u8; 16],
32469    #[doc = "Software major version number."]
32470    pub sw_version_major: u8,
32471    #[doc = "Software minor version number."]
32472    pub sw_version_minor: u8,
32473}
32474impl UAVCAN_NODE_INFO_DATA {
32475    pub const ENCODED_LEN: usize = 116usize;
32476    pub const DEFAULT: Self = Self {
32477        time_usec: 0_u64,
32478        uptime_sec: 0_u32,
32479        sw_vcs_commit: 0_u32,
32480        name: CharArray::new([0_u8; 80usize]),
32481        hw_version_major: 0_u8,
32482        hw_version_minor: 0_u8,
32483        hw_unique_id: [0_u8; 16usize],
32484        sw_version_major: 0_u8,
32485        sw_version_minor: 0_u8,
32486    };
32487    #[cfg(feature = "arbitrary")]
32488    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32489        use arbitrary::{Arbitrary, Unstructured};
32490        let mut buf = [0u8; 1024];
32491        rng.fill_bytes(&mut buf);
32492        let mut unstructured = Unstructured::new(&buf);
32493        Self::arbitrary(&mut unstructured).unwrap_or_default()
32494    }
32495}
32496impl Default for UAVCAN_NODE_INFO_DATA {
32497    fn default() -> Self {
32498        Self::DEFAULT.clone()
32499    }
32500}
32501impl MessageData for UAVCAN_NODE_INFO_DATA {
32502    type Message = MavMessage;
32503    const ID: u32 = 311u32;
32504    const NAME: &'static str = "UAVCAN_NODE_INFO";
32505    const EXTRA_CRC: u8 = 95u8;
32506    const ENCODED_LEN: usize = 116usize;
32507    fn deser(
32508        _version: MavlinkVersion,
32509        __input: &[u8],
32510    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32511        let avail_len = __input.len();
32512        let mut payload_buf = [0; Self::ENCODED_LEN];
32513        let mut buf = if avail_len < Self::ENCODED_LEN {
32514            payload_buf[0..avail_len].copy_from_slice(__input);
32515            Bytes::new(&payload_buf)
32516        } else {
32517            Bytes::new(__input)
32518        };
32519        let mut __struct = Self::default();
32520        __struct.time_usec = buf.get_u64_le();
32521        __struct.uptime_sec = buf.get_u32_le();
32522        __struct.sw_vcs_commit = buf.get_u32_le();
32523        let mut tmp = [0_u8; 80usize];
32524        for v in &mut tmp {
32525            *v = buf.get_u8();
32526        }
32527        __struct.name = CharArray::new(tmp);
32528        __struct.hw_version_major = buf.get_u8();
32529        __struct.hw_version_minor = buf.get_u8();
32530        for v in &mut __struct.hw_unique_id {
32531            let val = buf.get_u8();
32532            *v = val;
32533        }
32534        __struct.sw_version_major = buf.get_u8();
32535        __struct.sw_version_minor = buf.get_u8();
32536        Ok(__struct)
32537    }
32538    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32539        let mut __tmp = BytesMut::new(bytes);
32540        #[allow(clippy::absurd_extreme_comparisons)]
32541        #[allow(unused_comparisons)]
32542        if __tmp.remaining() < Self::ENCODED_LEN {
32543            panic!(
32544                "buffer is too small (need {} bytes, but got {})",
32545                Self::ENCODED_LEN,
32546                __tmp.remaining(),
32547            )
32548        }
32549        __tmp.put_u64_le(self.time_usec);
32550        __tmp.put_u32_le(self.uptime_sec);
32551        __tmp.put_u32_le(self.sw_vcs_commit);
32552        for val in &self.name {
32553            __tmp.put_u8(*val);
32554        }
32555        __tmp.put_u8(self.hw_version_major);
32556        __tmp.put_u8(self.hw_version_minor);
32557        for val in &self.hw_unique_id {
32558            __tmp.put_u8(*val);
32559        }
32560        __tmp.put_u8(self.sw_version_major);
32561        __tmp.put_u8(self.sw_version_minor);
32562        if matches!(version, MavlinkVersion::V2) {
32563            let len = __tmp.len();
32564            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32565        } else {
32566            __tmp.len()
32567        }
32568    }
32569}
32570#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
32571#[doc = ""]
32572#[doc = "ID: 310"]
32573#[derive(Debug, Clone, PartialEq)]
32574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32575#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32576#[cfg_attr(feature = "ts", derive(TS))]
32577#[cfg_attr(feature = "ts", ts(export))]
32578pub struct UAVCAN_NODE_STATUS_DATA {
32579    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32580    pub time_usec: u64,
32581    #[doc = "Time since the start-up of the node."]
32582    pub uptime_sec: u32,
32583    #[doc = "Vendor-specific status information."]
32584    pub vendor_specific_status_code: u16,
32585    #[doc = "Generalized node health status."]
32586    pub health: UavcanNodeHealth,
32587    #[doc = "Generalized operating mode."]
32588    pub mode: UavcanNodeMode,
32589    #[doc = "Not used currently."]
32590    pub sub_mode: u8,
32591}
32592impl UAVCAN_NODE_STATUS_DATA {
32593    pub const ENCODED_LEN: usize = 17usize;
32594    pub const DEFAULT: Self = Self {
32595        time_usec: 0_u64,
32596        uptime_sec: 0_u32,
32597        vendor_specific_status_code: 0_u16,
32598        health: UavcanNodeHealth::DEFAULT,
32599        mode: UavcanNodeMode::DEFAULT,
32600        sub_mode: 0_u8,
32601    };
32602    #[cfg(feature = "arbitrary")]
32603    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32604        use arbitrary::{Arbitrary, Unstructured};
32605        let mut buf = [0u8; 1024];
32606        rng.fill_bytes(&mut buf);
32607        let mut unstructured = Unstructured::new(&buf);
32608        Self::arbitrary(&mut unstructured).unwrap_or_default()
32609    }
32610}
32611impl Default for UAVCAN_NODE_STATUS_DATA {
32612    fn default() -> Self {
32613        Self::DEFAULT.clone()
32614    }
32615}
32616impl MessageData for UAVCAN_NODE_STATUS_DATA {
32617    type Message = MavMessage;
32618    const ID: u32 = 310u32;
32619    const NAME: &'static str = "UAVCAN_NODE_STATUS";
32620    const EXTRA_CRC: u8 = 28u8;
32621    const ENCODED_LEN: usize = 17usize;
32622    fn deser(
32623        _version: MavlinkVersion,
32624        __input: &[u8],
32625    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32626        let avail_len = __input.len();
32627        let mut payload_buf = [0; Self::ENCODED_LEN];
32628        let mut buf = if avail_len < Self::ENCODED_LEN {
32629            payload_buf[0..avail_len].copy_from_slice(__input);
32630            Bytes::new(&payload_buf)
32631        } else {
32632            Bytes::new(__input)
32633        };
32634        let mut __struct = Self::default();
32635        __struct.time_usec = buf.get_u64_le();
32636        __struct.uptime_sec = buf.get_u32_le();
32637        __struct.vendor_specific_status_code = buf.get_u16_le();
32638        let tmp = buf.get_u8();
32639        __struct.health =
32640            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32641                enum_type: "UavcanNodeHealth",
32642                value: tmp as u64,
32643            })?;
32644        let tmp = buf.get_u8();
32645        __struct.mode =
32646            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32647                enum_type: "UavcanNodeMode",
32648                value: tmp as u64,
32649            })?;
32650        __struct.sub_mode = buf.get_u8();
32651        Ok(__struct)
32652    }
32653    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32654        let mut __tmp = BytesMut::new(bytes);
32655        #[allow(clippy::absurd_extreme_comparisons)]
32656        #[allow(unused_comparisons)]
32657        if __tmp.remaining() < Self::ENCODED_LEN {
32658            panic!(
32659                "buffer is too small (need {} bytes, but got {})",
32660                Self::ENCODED_LEN,
32661                __tmp.remaining(),
32662            )
32663        }
32664        __tmp.put_u64_le(self.time_usec);
32665        __tmp.put_u32_le(self.uptime_sec);
32666        __tmp.put_u16_le(self.vendor_specific_status_code);
32667        __tmp.put_u8(self.health as u8);
32668        __tmp.put_u8(self.mode as u8);
32669        __tmp.put_u8(self.sub_mode);
32670        if matches!(version, MavlinkVersion::V2) {
32671            let len = __tmp.len();
32672            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32673        } else {
32674            __tmp.len()
32675        }
32676    }
32677}
32678#[doc = "The global position resulting from GPS and sensor fusion."]
32679#[doc = ""]
32680#[doc = "ID: 340"]
32681#[derive(Debug, Clone, PartialEq)]
32682#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32683#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32684#[cfg_attr(feature = "ts", derive(TS))]
32685#[cfg_attr(feature = "ts", ts(export))]
32686pub struct UTM_GLOBAL_POSITION_DATA {
32687    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
32688    pub time: u64,
32689    #[doc = "Latitude (WGS84)"]
32690    pub lat: i32,
32691    #[doc = "Longitude (WGS84)"]
32692    pub lon: i32,
32693    #[doc = "Altitude (WGS84)"]
32694    pub alt: i32,
32695    #[doc = "Altitude above ground"]
32696    pub relative_alt: i32,
32697    #[doc = "Next waypoint, latitude (WGS84)"]
32698    pub next_lat: i32,
32699    #[doc = "Next waypoint, longitude (WGS84)"]
32700    pub next_lon: i32,
32701    #[doc = "Next waypoint, altitude (WGS84)"]
32702    pub next_alt: i32,
32703    #[doc = "Ground X speed (latitude, positive north)"]
32704    pub vx: i16,
32705    #[doc = "Ground Y speed (longitude, positive east)"]
32706    pub vy: i16,
32707    #[doc = "Ground Z speed (altitude, positive down)"]
32708    pub vz: i16,
32709    #[doc = "Horizontal position uncertainty (standard deviation)"]
32710    pub h_acc: u16,
32711    #[doc = "Altitude uncertainty (standard deviation)"]
32712    pub v_acc: u16,
32713    #[doc = "Speed uncertainty (standard deviation)"]
32714    pub vel_acc: u16,
32715    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
32716    pub update_rate: u16,
32717    #[doc = "Unique UAS ID."]
32718    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32719    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32720    pub uas_id: [u8; 18],
32721    #[doc = "Flight state"]
32722    pub flight_state: UtmFlightState,
32723    #[doc = "Bitwise OR combination of the data available flags."]
32724    pub flags: UtmDataAvailFlags,
32725}
32726impl UTM_GLOBAL_POSITION_DATA {
32727    pub const ENCODED_LEN: usize = 70usize;
32728    pub const DEFAULT: Self = Self {
32729        time: 0_u64,
32730        lat: 0_i32,
32731        lon: 0_i32,
32732        alt: 0_i32,
32733        relative_alt: 0_i32,
32734        next_lat: 0_i32,
32735        next_lon: 0_i32,
32736        next_alt: 0_i32,
32737        vx: 0_i16,
32738        vy: 0_i16,
32739        vz: 0_i16,
32740        h_acc: 0_u16,
32741        v_acc: 0_u16,
32742        vel_acc: 0_u16,
32743        update_rate: 0_u16,
32744        uas_id: [0_u8; 18usize],
32745        flight_state: UtmFlightState::DEFAULT,
32746        flags: UtmDataAvailFlags::DEFAULT,
32747    };
32748    #[cfg(feature = "arbitrary")]
32749    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32750        use arbitrary::{Arbitrary, Unstructured};
32751        let mut buf = [0u8; 1024];
32752        rng.fill_bytes(&mut buf);
32753        let mut unstructured = Unstructured::new(&buf);
32754        Self::arbitrary(&mut unstructured).unwrap_or_default()
32755    }
32756}
32757impl Default for UTM_GLOBAL_POSITION_DATA {
32758    fn default() -> Self {
32759        Self::DEFAULT.clone()
32760    }
32761}
32762impl MessageData for UTM_GLOBAL_POSITION_DATA {
32763    type Message = MavMessage;
32764    const ID: u32 = 340u32;
32765    const NAME: &'static str = "UTM_GLOBAL_POSITION";
32766    const EXTRA_CRC: u8 = 99u8;
32767    const ENCODED_LEN: usize = 70usize;
32768    fn deser(
32769        _version: MavlinkVersion,
32770        __input: &[u8],
32771    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32772        let avail_len = __input.len();
32773        let mut payload_buf = [0; Self::ENCODED_LEN];
32774        let mut buf = if avail_len < Self::ENCODED_LEN {
32775            payload_buf[0..avail_len].copy_from_slice(__input);
32776            Bytes::new(&payload_buf)
32777        } else {
32778            Bytes::new(__input)
32779        };
32780        let mut __struct = Self::default();
32781        __struct.time = buf.get_u64_le();
32782        __struct.lat = buf.get_i32_le();
32783        __struct.lon = buf.get_i32_le();
32784        __struct.alt = buf.get_i32_le();
32785        __struct.relative_alt = buf.get_i32_le();
32786        __struct.next_lat = buf.get_i32_le();
32787        __struct.next_lon = buf.get_i32_le();
32788        __struct.next_alt = buf.get_i32_le();
32789        __struct.vx = buf.get_i16_le();
32790        __struct.vy = buf.get_i16_le();
32791        __struct.vz = buf.get_i16_le();
32792        __struct.h_acc = buf.get_u16_le();
32793        __struct.v_acc = buf.get_u16_le();
32794        __struct.vel_acc = buf.get_u16_le();
32795        __struct.update_rate = buf.get_u16_le();
32796        for v in &mut __struct.uas_id {
32797            let val = buf.get_u8();
32798            *v = val;
32799        }
32800        let tmp = buf.get_u8();
32801        __struct.flight_state =
32802            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32803                enum_type: "UtmFlightState",
32804                value: tmp as u64,
32805            })?;
32806        let tmp = buf.get_u8();
32807        __struct.flags = UtmDataAvailFlags::from_bits(tmp as <UtmDataAvailFlags as Flags>::Bits)
32808            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32809                flag_type: "UtmDataAvailFlags",
32810                value: tmp as u64,
32811            })?;
32812        Ok(__struct)
32813    }
32814    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32815        let mut __tmp = BytesMut::new(bytes);
32816        #[allow(clippy::absurd_extreme_comparisons)]
32817        #[allow(unused_comparisons)]
32818        if __tmp.remaining() < Self::ENCODED_LEN {
32819            panic!(
32820                "buffer is too small (need {} bytes, but got {})",
32821                Self::ENCODED_LEN,
32822                __tmp.remaining(),
32823            )
32824        }
32825        __tmp.put_u64_le(self.time);
32826        __tmp.put_i32_le(self.lat);
32827        __tmp.put_i32_le(self.lon);
32828        __tmp.put_i32_le(self.alt);
32829        __tmp.put_i32_le(self.relative_alt);
32830        __tmp.put_i32_le(self.next_lat);
32831        __tmp.put_i32_le(self.next_lon);
32832        __tmp.put_i32_le(self.next_alt);
32833        __tmp.put_i16_le(self.vx);
32834        __tmp.put_i16_le(self.vy);
32835        __tmp.put_i16_le(self.vz);
32836        __tmp.put_u16_le(self.h_acc);
32837        __tmp.put_u16_le(self.v_acc);
32838        __tmp.put_u16_le(self.vel_acc);
32839        __tmp.put_u16_le(self.update_rate);
32840        for val in &self.uas_id {
32841            __tmp.put_u8(*val);
32842        }
32843        __tmp.put_u8(self.flight_state as u8);
32844        __tmp.put_u8(self.flags.bits() as u8);
32845        if matches!(version, MavlinkVersion::V2) {
32846            let len = __tmp.len();
32847            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32848        } else {
32849            __tmp.len()
32850        }
32851    }
32852}
32853#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
32854#[doc = ""]
32855#[doc = "ID: 248"]
32856#[derive(Debug, Clone, PartialEq)]
32857#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32859#[cfg_attr(feature = "ts", derive(TS))]
32860#[cfg_attr(feature = "ts", ts(export))]
32861pub struct V2_EXTENSION_DATA {
32862    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32863    pub message_type: u16,
32864    #[doc = "Network ID (0 for broadcast)"]
32865    pub target_network: u8,
32866    #[doc = "System ID (0 for broadcast)"]
32867    pub target_system: u8,
32868    #[doc = "Component ID (0 for broadcast)"]
32869    pub target_component: u8,
32870    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
32871    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32872    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32873    pub payload: [u8; 249],
32874}
32875impl V2_EXTENSION_DATA {
32876    pub const ENCODED_LEN: usize = 254usize;
32877    pub const DEFAULT: Self = Self {
32878        message_type: 0_u16,
32879        target_network: 0_u8,
32880        target_system: 0_u8,
32881        target_component: 0_u8,
32882        payload: [0_u8; 249usize],
32883    };
32884    #[cfg(feature = "arbitrary")]
32885    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32886        use arbitrary::{Arbitrary, Unstructured};
32887        let mut buf = [0u8; 1024];
32888        rng.fill_bytes(&mut buf);
32889        let mut unstructured = Unstructured::new(&buf);
32890        Self::arbitrary(&mut unstructured).unwrap_or_default()
32891    }
32892}
32893impl Default for V2_EXTENSION_DATA {
32894    fn default() -> Self {
32895        Self::DEFAULT.clone()
32896    }
32897}
32898impl MessageData for V2_EXTENSION_DATA {
32899    type Message = MavMessage;
32900    const ID: u32 = 248u32;
32901    const NAME: &'static str = "V2_EXTENSION";
32902    const EXTRA_CRC: u8 = 8u8;
32903    const ENCODED_LEN: usize = 254usize;
32904    fn deser(
32905        _version: MavlinkVersion,
32906        __input: &[u8],
32907    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32908        let avail_len = __input.len();
32909        let mut payload_buf = [0; Self::ENCODED_LEN];
32910        let mut buf = if avail_len < Self::ENCODED_LEN {
32911            payload_buf[0..avail_len].copy_from_slice(__input);
32912            Bytes::new(&payload_buf)
32913        } else {
32914            Bytes::new(__input)
32915        };
32916        let mut __struct = Self::default();
32917        __struct.message_type = buf.get_u16_le();
32918        __struct.target_network = buf.get_u8();
32919        __struct.target_system = buf.get_u8();
32920        __struct.target_component = buf.get_u8();
32921        for v in &mut __struct.payload {
32922            let val = buf.get_u8();
32923            *v = val;
32924        }
32925        Ok(__struct)
32926    }
32927    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32928        let mut __tmp = BytesMut::new(bytes);
32929        #[allow(clippy::absurd_extreme_comparisons)]
32930        #[allow(unused_comparisons)]
32931        if __tmp.remaining() < Self::ENCODED_LEN {
32932            panic!(
32933                "buffer is too small (need {} bytes, but got {})",
32934                Self::ENCODED_LEN,
32935                __tmp.remaining(),
32936            )
32937        }
32938        __tmp.put_u16_le(self.message_type);
32939        __tmp.put_u8(self.target_network);
32940        __tmp.put_u8(self.target_system);
32941        __tmp.put_u8(self.target_component);
32942        for val in &self.payload {
32943            __tmp.put_u8(*val);
32944        }
32945        if matches!(version, MavlinkVersion::V2) {
32946            let len = __tmp.len();
32947            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32948        } else {
32949            __tmp.len()
32950        }
32951    }
32952}
32953#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
32954#[doc = ""]
32955#[doc = "ID: 74"]
32956#[derive(Debug, Clone, PartialEq)]
32957#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32958#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32959#[cfg_attr(feature = "ts", derive(TS))]
32960#[cfg_attr(feature = "ts", ts(export))]
32961pub struct VFR_HUD_DATA {
32962    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
32963    pub airspeed: f32,
32964    #[doc = "Current ground speed."]
32965    pub groundspeed: f32,
32966    #[doc = "Current altitude (MSL)."]
32967    pub alt: f32,
32968    #[doc = "Current climb rate."]
32969    pub climb: f32,
32970    #[doc = "Current heading in compass units (0-360, 0=north)."]
32971    pub heading: i16,
32972    #[doc = "Current throttle setting (0 to 100)."]
32973    pub throttle: u16,
32974}
32975impl VFR_HUD_DATA {
32976    pub const ENCODED_LEN: usize = 20usize;
32977    pub const DEFAULT: Self = Self {
32978        airspeed: 0.0_f32,
32979        groundspeed: 0.0_f32,
32980        alt: 0.0_f32,
32981        climb: 0.0_f32,
32982        heading: 0_i16,
32983        throttle: 0_u16,
32984    };
32985    #[cfg(feature = "arbitrary")]
32986    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32987        use arbitrary::{Arbitrary, Unstructured};
32988        let mut buf = [0u8; 1024];
32989        rng.fill_bytes(&mut buf);
32990        let mut unstructured = Unstructured::new(&buf);
32991        Self::arbitrary(&mut unstructured).unwrap_or_default()
32992    }
32993}
32994impl Default for VFR_HUD_DATA {
32995    fn default() -> Self {
32996        Self::DEFAULT.clone()
32997    }
32998}
32999impl MessageData for VFR_HUD_DATA {
33000    type Message = MavMessage;
33001    const ID: u32 = 74u32;
33002    const NAME: &'static str = "VFR_HUD";
33003    const EXTRA_CRC: u8 = 20u8;
33004    const ENCODED_LEN: usize = 20usize;
33005    fn deser(
33006        _version: MavlinkVersion,
33007        __input: &[u8],
33008    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33009        let avail_len = __input.len();
33010        let mut payload_buf = [0; Self::ENCODED_LEN];
33011        let mut buf = if avail_len < Self::ENCODED_LEN {
33012            payload_buf[0..avail_len].copy_from_slice(__input);
33013            Bytes::new(&payload_buf)
33014        } else {
33015            Bytes::new(__input)
33016        };
33017        let mut __struct = Self::default();
33018        __struct.airspeed = buf.get_f32_le();
33019        __struct.groundspeed = buf.get_f32_le();
33020        __struct.alt = buf.get_f32_le();
33021        __struct.climb = buf.get_f32_le();
33022        __struct.heading = buf.get_i16_le();
33023        __struct.throttle = buf.get_u16_le();
33024        Ok(__struct)
33025    }
33026    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33027        let mut __tmp = BytesMut::new(bytes);
33028        #[allow(clippy::absurd_extreme_comparisons)]
33029        #[allow(unused_comparisons)]
33030        if __tmp.remaining() < Self::ENCODED_LEN {
33031            panic!(
33032                "buffer is too small (need {} bytes, but got {})",
33033                Self::ENCODED_LEN,
33034                __tmp.remaining(),
33035            )
33036        }
33037        __tmp.put_f32_le(self.airspeed);
33038        __tmp.put_f32_le(self.groundspeed);
33039        __tmp.put_f32_le(self.alt);
33040        __tmp.put_f32_le(self.climb);
33041        __tmp.put_i16_le(self.heading);
33042        __tmp.put_u16_le(self.throttle);
33043        if matches!(version, MavlinkVersion::V2) {
33044            let len = __tmp.len();
33045            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33046        } else {
33047            __tmp.len()
33048        }
33049    }
33050}
33051#[doc = "Vibration levels and accelerometer clipping."]
33052#[doc = ""]
33053#[doc = "ID: 241"]
33054#[derive(Debug, Clone, PartialEq)]
33055#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33056#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33057#[cfg_attr(feature = "ts", derive(TS))]
33058#[cfg_attr(feature = "ts", ts(export))]
33059pub struct VIBRATION_DATA {
33060    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33061    pub time_usec: u64,
33062    #[doc = "Vibration levels on X-axis"]
33063    pub vibration_x: f32,
33064    #[doc = "Vibration levels on Y-axis"]
33065    pub vibration_y: f32,
33066    #[doc = "Vibration levels on Z-axis"]
33067    pub vibration_z: f32,
33068    #[doc = "first accelerometer clipping count"]
33069    pub clipping_0: u32,
33070    #[doc = "second accelerometer clipping count"]
33071    pub clipping_1: u32,
33072    #[doc = "third accelerometer clipping count"]
33073    pub clipping_2: u32,
33074}
33075impl VIBRATION_DATA {
33076    pub const ENCODED_LEN: usize = 32usize;
33077    pub const DEFAULT: Self = Self {
33078        time_usec: 0_u64,
33079        vibration_x: 0.0_f32,
33080        vibration_y: 0.0_f32,
33081        vibration_z: 0.0_f32,
33082        clipping_0: 0_u32,
33083        clipping_1: 0_u32,
33084        clipping_2: 0_u32,
33085    };
33086    #[cfg(feature = "arbitrary")]
33087    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33088        use arbitrary::{Arbitrary, Unstructured};
33089        let mut buf = [0u8; 1024];
33090        rng.fill_bytes(&mut buf);
33091        let mut unstructured = Unstructured::new(&buf);
33092        Self::arbitrary(&mut unstructured).unwrap_or_default()
33093    }
33094}
33095impl Default for VIBRATION_DATA {
33096    fn default() -> Self {
33097        Self::DEFAULT.clone()
33098    }
33099}
33100impl MessageData for VIBRATION_DATA {
33101    type Message = MavMessage;
33102    const ID: u32 = 241u32;
33103    const NAME: &'static str = "VIBRATION";
33104    const EXTRA_CRC: u8 = 90u8;
33105    const ENCODED_LEN: usize = 32usize;
33106    fn deser(
33107        _version: MavlinkVersion,
33108        __input: &[u8],
33109    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33110        let avail_len = __input.len();
33111        let mut payload_buf = [0; Self::ENCODED_LEN];
33112        let mut buf = if avail_len < Self::ENCODED_LEN {
33113            payload_buf[0..avail_len].copy_from_slice(__input);
33114            Bytes::new(&payload_buf)
33115        } else {
33116            Bytes::new(__input)
33117        };
33118        let mut __struct = Self::default();
33119        __struct.time_usec = buf.get_u64_le();
33120        __struct.vibration_x = buf.get_f32_le();
33121        __struct.vibration_y = buf.get_f32_le();
33122        __struct.vibration_z = buf.get_f32_le();
33123        __struct.clipping_0 = buf.get_u32_le();
33124        __struct.clipping_1 = buf.get_u32_le();
33125        __struct.clipping_2 = buf.get_u32_le();
33126        Ok(__struct)
33127    }
33128    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33129        let mut __tmp = BytesMut::new(bytes);
33130        #[allow(clippy::absurd_extreme_comparisons)]
33131        #[allow(unused_comparisons)]
33132        if __tmp.remaining() < Self::ENCODED_LEN {
33133            panic!(
33134                "buffer is too small (need {} bytes, but got {})",
33135                Self::ENCODED_LEN,
33136                __tmp.remaining(),
33137            )
33138        }
33139        __tmp.put_u64_le(self.time_usec);
33140        __tmp.put_f32_le(self.vibration_x);
33141        __tmp.put_f32_le(self.vibration_y);
33142        __tmp.put_f32_le(self.vibration_z);
33143        __tmp.put_u32_le(self.clipping_0);
33144        __tmp.put_u32_le(self.clipping_1);
33145        __tmp.put_u32_le(self.clipping_2);
33146        if matches!(version, MavlinkVersion::V2) {
33147            let len = __tmp.len();
33148            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33149        } else {
33150            __tmp.len()
33151        }
33152    }
33153}
33154#[doc = "Global position estimate from a Vicon motion system source."]
33155#[doc = ""]
33156#[doc = "ID: 104"]
33157#[derive(Debug, Clone, PartialEq)]
33158#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33159#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33160#[cfg_attr(feature = "ts", derive(TS))]
33161#[cfg_attr(feature = "ts", ts(export))]
33162pub struct VICON_POSITION_ESTIMATE_DATA {
33163    #[doc = "Timestamp (UNIX time or time since system boot)"]
33164    pub usec: u64,
33165    #[doc = "Global X position"]
33166    pub x: f32,
33167    #[doc = "Global Y position"]
33168    pub y: f32,
33169    #[doc = "Global Z position"]
33170    pub z: f32,
33171    #[doc = "Roll angle"]
33172    pub roll: f32,
33173    #[doc = "Pitch angle"]
33174    pub pitch: f32,
33175    #[doc = "Yaw angle"]
33176    pub yaw: f32,
33177    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
33178    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33179    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33180    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33181    pub covariance: [f32; 21],
33182}
33183impl VICON_POSITION_ESTIMATE_DATA {
33184    pub const ENCODED_LEN: usize = 116usize;
33185    pub const DEFAULT: Self = Self {
33186        usec: 0_u64,
33187        x: 0.0_f32,
33188        y: 0.0_f32,
33189        z: 0.0_f32,
33190        roll: 0.0_f32,
33191        pitch: 0.0_f32,
33192        yaw: 0.0_f32,
33193        covariance: [0.0_f32; 21usize],
33194    };
33195    #[cfg(feature = "arbitrary")]
33196    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33197        use arbitrary::{Arbitrary, Unstructured};
33198        let mut buf = [0u8; 1024];
33199        rng.fill_bytes(&mut buf);
33200        let mut unstructured = Unstructured::new(&buf);
33201        Self::arbitrary(&mut unstructured).unwrap_or_default()
33202    }
33203}
33204impl Default for VICON_POSITION_ESTIMATE_DATA {
33205    fn default() -> Self {
33206        Self::DEFAULT.clone()
33207    }
33208}
33209impl MessageData for VICON_POSITION_ESTIMATE_DATA {
33210    type Message = MavMessage;
33211    const ID: u32 = 104u32;
33212    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
33213    const EXTRA_CRC: u8 = 56u8;
33214    const ENCODED_LEN: usize = 116usize;
33215    fn deser(
33216        _version: MavlinkVersion,
33217        __input: &[u8],
33218    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33219        let avail_len = __input.len();
33220        let mut payload_buf = [0; Self::ENCODED_LEN];
33221        let mut buf = if avail_len < Self::ENCODED_LEN {
33222            payload_buf[0..avail_len].copy_from_slice(__input);
33223            Bytes::new(&payload_buf)
33224        } else {
33225            Bytes::new(__input)
33226        };
33227        let mut __struct = Self::default();
33228        __struct.usec = buf.get_u64_le();
33229        __struct.x = buf.get_f32_le();
33230        __struct.y = buf.get_f32_le();
33231        __struct.z = buf.get_f32_le();
33232        __struct.roll = buf.get_f32_le();
33233        __struct.pitch = buf.get_f32_le();
33234        __struct.yaw = buf.get_f32_le();
33235        for v in &mut __struct.covariance {
33236            let val = buf.get_f32_le();
33237            *v = val;
33238        }
33239        Ok(__struct)
33240    }
33241    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33242        let mut __tmp = BytesMut::new(bytes);
33243        #[allow(clippy::absurd_extreme_comparisons)]
33244        #[allow(unused_comparisons)]
33245        if __tmp.remaining() < Self::ENCODED_LEN {
33246            panic!(
33247                "buffer is too small (need {} bytes, but got {})",
33248                Self::ENCODED_LEN,
33249                __tmp.remaining(),
33250            )
33251        }
33252        __tmp.put_u64_le(self.usec);
33253        __tmp.put_f32_le(self.x);
33254        __tmp.put_f32_le(self.y);
33255        __tmp.put_f32_le(self.z);
33256        __tmp.put_f32_le(self.roll);
33257        __tmp.put_f32_le(self.pitch);
33258        __tmp.put_f32_le(self.yaw);
33259        if matches!(version, MavlinkVersion::V2) {
33260            for val in &self.covariance {
33261                __tmp.put_f32_le(*val);
33262            }
33263            let len = __tmp.len();
33264            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33265        } else {
33266            __tmp.len()
33267        }
33268    }
33269}
33270#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33271#[doc = ""]
33272#[doc = "ID: 269"]
33273#[derive(Debug, Clone, PartialEq)]
33274#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33275#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33276#[cfg_attr(feature = "ts", derive(TS))]
33277#[cfg_attr(feature = "ts", ts(export))]
33278pub struct VIDEO_STREAM_INFORMATION_DATA {
33279    #[doc = "Frame rate."]
33280    pub framerate: f32,
33281    #[doc = "Bit rate."]
33282    pub bitrate: u32,
33283    #[doc = "Bitmap of stream status flags."]
33284    pub flags: VideoStreamStatusFlags,
33285    #[doc = "Horizontal resolution."]
33286    pub resolution_h: u16,
33287    #[doc = "Vertical resolution."]
33288    pub resolution_v: u16,
33289    #[doc = "Video image rotation clockwise."]
33290    pub rotation: u16,
33291    #[doc = "Horizontal Field of view."]
33292    pub hfov: u16,
33293    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
33294    pub stream_id: u8,
33295    #[doc = "Number of streams available."]
33296    pub count: u8,
33297    #[doc = "Type of stream."]
33298    pub mavtype: VideoStreamType,
33299    #[doc = "Stream name."]
33300    #[cfg_attr(feature = "ts", ts(type = "string"))]
33301    pub name: CharArray<32>,
33302    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
33303    #[cfg_attr(feature = "ts", ts(type = "string"))]
33304    pub uri: CharArray<160>,
33305    #[doc = "Encoding of stream."]
33306    #[cfg_attr(feature = "serde", serde(default))]
33307    pub encoding: VideoStreamEncoding,
33308    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
33309    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33310    pub camera_device_id: u8,
33311}
33312impl VIDEO_STREAM_INFORMATION_DATA {
33313    pub const ENCODED_LEN: usize = 215usize;
33314    pub const DEFAULT: Self = Self {
33315        framerate: 0.0_f32,
33316        bitrate: 0_u32,
33317        flags: VideoStreamStatusFlags::DEFAULT,
33318        resolution_h: 0_u16,
33319        resolution_v: 0_u16,
33320        rotation: 0_u16,
33321        hfov: 0_u16,
33322        stream_id: 0_u8,
33323        count: 0_u8,
33324        mavtype: VideoStreamType::DEFAULT,
33325        name: CharArray::new([0_u8; 32usize]),
33326        uri: CharArray::new([0_u8; 160usize]),
33327        encoding: VideoStreamEncoding::DEFAULT,
33328        camera_device_id: 0_u8,
33329    };
33330    #[cfg(feature = "arbitrary")]
33331    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33332        use arbitrary::{Arbitrary, Unstructured};
33333        let mut buf = [0u8; 1024];
33334        rng.fill_bytes(&mut buf);
33335        let mut unstructured = Unstructured::new(&buf);
33336        Self::arbitrary(&mut unstructured).unwrap_or_default()
33337    }
33338}
33339impl Default for VIDEO_STREAM_INFORMATION_DATA {
33340    fn default() -> Self {
33341        Self::DEFAULT.clone()
33342    }
33343}
33344impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
33345    type Message = MavMessage;
33346    const ID: u32 = 269u32;
33347    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
33348    const EXTRA_CRC: u8 = 109u8;
33349    const ENCODED_LEN: usize = 215usize;
33350    fn deser(
33351        _version: MavlinkVersion,
33352        __input: &[u8],
33353    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33354        let avail_len = __input.len();
33355        let mut payload_buf = [0; Self::ENCODED_LEN];
33356        let mut buf = if avail_len < Self::ENCODED_LEN {
33357            payload_buf[0..avail_len].copy_from_slice(__input);
33358            Bytes::new(&payload_buf)
33359        } else {
33360            Bytes::new(__input)
33361        };
33362        let mut __struct = Self::default();
33363        __struct.framerate = buf.get_f32_le();
33364        __struct.bitrate = buf.get_u32_le();
33365        let tmp = buf.get_u16_le();
33366        __struct.flags =
33367            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
33368                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33369                    flag_type: "VideoStreamStatusFlags",
33370                    value: tmp as u64,
33371                })?;
33372        __struct.resolution_h = buf.get_u16_le();
33373        __struct.resolution_v = buf.get_u16_le();
33374        __struct.rotation = buf.get_u16_le();
33375        __struct.hfov = buf.get_u16_le();
33376        __struct.stream_id = buf.get_u8();
33377        __struct.count = buf.get_u8();
33378        let tmp = buf.get_u8();
33379        __struct.mavtype =
33380            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33381                enum_type: "VideoStreamType",
33382                value: tmp as u64,
33383            })?;
33384        let mut tmp = [0_u8; 32usize];
33385        for v in &mut tmp {
33386            *v = buf.get_u8();
33387        }
33388        __struct.name = CharArray::new(tmp);
33389        let mut tmp = [0_u8; 160usize];
33390        for v in &mut tmp {
33391            *v = buf.get_u8();
33392        }
33393        __struct.uri = CharArray::new(tmp);
33394        let tmp = buf.get_u8();
33395        __struct.encoding =
33396            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33397                enum_type: "VideoStreamEncoding",
33398                value: tmp as u64,
33399            })?;
33400        __struct.camera_device_id = buf.get_u8();
33401        Ok(__struct)
33402    }
33403    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33404        let mut __tmp = BytesMut::new(bytes);
33405        #[allow(clippy::absurd_extreme_comparisons)]
33406        #[allow(unused_comparisons)]
33407        if __tmp.remaining() < Self::ENCODED_LEN {
33408            panic!(
33409                "buffer is too small (need {} bytes, but got {})",
33410                Self::ENCODED_LEN,
33411                __tmp.remaining(),
33412            )
33413        }
33414        __tmp.put_f32_le(self.framerate);
33415        __tmp.put_u32_le(self.bitrate);
33416        __tmp.put_u16_le(self.flags.bits() as u16);
33417        __tmp.put_u16_le(self.resolution_h);
33418        __tmp.put_u16_le(self.resolution_v);
33419        __tmp.put_u16_le(self.rotation);
33420        __tmp.put_u16_le(self.hfov);
33421        __tmp.put_u8(self.stream_id);
33422        __tmp.put_u8(self.count);
33423        __tmp.put_u8(self.mavtype as u8);
33424        for val in &self.name {
33425            __tmp.put_u8(*val);
33426        }
33427        for val in &self.uri {
33428            __tmp.put_u8(*val);
33429        }
33430        if matches!(version, MavlinkVersion::V2) {
33431            __tmp.put_u8(self.encoding as u8);
33432            __tmp.put_u8(self.camera_device_id);
33433            let len = __tmp.len();
33434            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33435        } else {
33436            __tmp.len()
33437        }
33438    }
33439}
33440#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33441#[doc = ""]
33442#[doc = "ID: 270"]
33443#[derive(Debug, Clone, PartialEq)]
33444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33445#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33446#[cfg_attr(feature = "ts", derive(TS))]
33447#[cfg_attr(feature = "ts", ts(export))]
33448pub struct VIDEO_STREAM_STATUS_DATA {
33449    #[doc = "Frame rate"]
33450    pub framerate: f32,
33451    #[doc = "Bit rate"]
33452    pub bitrate: u32,
33453    #[doc = "Bitmap of stream status flags"]
33454    pub flags: VideoStreamStatusFlags,
33455    #[doc = "Horizontal resolution"]
33456    pub resolution_h: u16,
33457    #[doc = "Vertical resolution"]
33458    pub resolution_v: u16,
33459    #[doc = "Video image rotation clockwise"]
33460    pub rotation: u16,
33461    #[doc = "Horizontal Field of view"]
33462    pub hfov: u16,
33463    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
33464    pub stream_id: u8,
33465    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
33466    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33467    pub camera_device_id: u8,
33468}
33469impl VIDEO_STREAM_STATUS_DATA {
33470    pub const ENCODED_LEN: usize = 20usize;
33471    pub const DEFAULT: Self = Self {
33472        framerate: 0.0_f32,
33473        bitrate: 0_u32,
33474        flags: VideoStreamStatusFlags::DEFAULT,
33475        resolution_h: 0_u16,
33476        resolution_v: 0_u16,
33477        rotation: 0_u16,
33478        hfov: 0_u16,
33479        stream_id: 0_u8,
33480        camera_device_id: 0_u8,
33481    };
33482    #[cfg(feature = "arbitrary")]
33483    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33484        use arbitrary::{Arbitrary, Unstructured};
33485        let mut buf = [0u8; 1024];
33486        rng.fill_bytes(&mut buf);
33487        let mut unstructured = Unstructured::new(&buf);
33488        Self::arbitrary(&mut unstructured).unwrap_or_default()
33489    }
33490}
33491impl Default for VIDEO_STREAM_STATUS_DATA {
33492    fn default() -> Self {
33493        Self::DEFAULT.clone()
33494    }
33495}
33496impl MessageData for VIDEO_STREAM_STATUS_DATA {
33497    type Message = MavMessage;
33498    const ID: u32 = 270u32;
33499    const NAME: &'static str = "VIDEO_STREAM_STATUS";
33500    const EXTRA_CRC: u8 = 59u8;
33501    const ENCODED_LEN: usize = 20usize;
33502    fn deser(
33503        _version: MavlinkVersion,
33504        __input: &[u8],
33505    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33506        let avail_len = __input.len();
33507        let mut payload_buf = [0; Self::ENCODED_LEN];
33508        let mut buf = if avail_len < Self::ENCODED_LEN {
33509            payload_buf[0..avail_len].copy_from_slice(__input);
33510            Bytes::new(&payload_buf)
33511        } else {
33512            Bytes::new(__input)
33513        };
33514        let mut __struct = Self::default();
33515        __struct.framerate = buf.get_f32_le();
33516        __struct.bitrate = buf.get_u32_le();
33517        let tmp = buf.get_u16_le();
33518        __struct.flags =
33519            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
33520                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33521                    flag_type: "VideoStreamStatusFlags",
33522                    value: tmp as u64,
33523                })?;
33524        __struct.resolution_h = buf.get_u16_le();
33525        __struct.resolution_v = buf.get_u16_le();
33526        __struct.rotation = buf.get_u16_le();
33527        __struct.hfov = buf.get_u16_le();
33528        __struct.stream_id = buf.get_u8();
33529        __struct.camera_device_id = buf.get_u8();
33530        Ok(__struct)
33531    }
33532    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33533        let mut __tmp = BytesMut::new(bytes);
33534        #[allow(clippy::absurd_extreme_comparisons)]
33535        #[allow(unused_comparisons)]
33536        if __tmp.remaining() < Self::ENCODED_LEN {
33537            panic!(
33538                "buffer is too small (need {} bytes, but got {})",
33539                Self::ENCODED_LEN,
33540                __tmp.remaining(),
33541            )
33542        }
33543        __tmp.put_f32_le(self.framerate);
33544        __tmp.put_u32_le(self.bitrate);
33545        __tmp.put_u16_le(self.flags.bits() as u16);
33546        __tmp.put_u16_le(self.resolution_h);
33547        __tmp.put_u16_le(self.resolution_v);
33548        __tmp.put_u16_le(self.rotation);
33549        __tmp.put_u16_le(self.hfov);
33550        __tmp.put_u8(self.stream_id);
33551        if matches!(version, MavlinkVersion::V2) {
33552            __tmp.put_u8(self.camera_device_id);
33553            let len = __tmp.len();
33554            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33555        } else {
33556            __tmp.len()
33557        }
33558    }
33559}
33560#[doc = "Local position/attitude estimate from a vision source."]
33561#[doc = ""]
33562#[doc = "ID: 102"]
33563#[derive(Debug, Clone, PartialEq)]
33564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33565#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33566#[cfg_attr(feature = "ts", derive(TS))]
33567#[cfg_attr(feature = "ts", ts(export))]
33568pub struct VISION_POSITION_ESTIMATE_DATA {
33569    #[doc = "Timestamp (UNIX time or time since system boot)"]
33570    pub usec: u64,
33571    #[doc = "Local X position"]
33572    pub x: f32,
33573    #[doc = "Local Y position"]
33574    pub y: f32,
33575    #[doc = "Local Z position"]
33576    pub z: f32,
33577    #[doc = "Roll angle"]
33578    pub roll: f32,
33579    #[doc = "Pitch angle"]
33580    pub pitch: f32,
33581    #[doc = "Yaw angle"]
33582    pub yaw: f32,
33583    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
33584    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33585    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33586    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33587    pub covariance: [f32; 21],
33588    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33589    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33590    pub reset_counter: u8,
33591}
33592impl VISION_POSITION_ESTIMATE_DATA {
33593    pub const ENCODED_LEN: usize = 117usize;
33594    pub const DEFAULT: Self = Self {
33595        usec: 0_u64,
33596        x: 0.0_f32,
33597        y: 0.0_f32,
33598        z: 0.0_f32,
33599        roll: 0.0_f32,
33600        pitch: 0.0_f32,
33601        yaw: 0.0_f32,
33602        covariance: [0.0_f32; 21usize],
33603        reset_counter: 0_u8,
33604    };
33605    #[cfg(feature = "arbitrary")]
33606    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33607        use arbitrary::{Arbitrary, Unstructured};
33608        let mut buf = [0u8; 1024];
33609        rng.fill_bytes(&mut buf);
33610        let mut unstructured = Unstructured::new(&buf);
33611        Self::arbitrary(&mut unstructured).unwrap_or_default()
33612    }
33613}
33614impl Default for VISION_POSITION_ESTIMATE_DATA {
33615    fn default() -> Self {
33616        Self::DEFAULT.clone()
33617    }
33618}
33619impl MessageData for VISION_POSITION_ESTIMATE_DATA {
33620    type Message = MavMessage;
33621    const ID: u32 = 102u32;
33622    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
33623    const EXTRA_CRC: u8 = 158u8;
33624    const ENCODED_LEN: usize = 117usize;
33625    fn deser(
33626        _version: MavlinkVersion,
33627        __input: &[u8],
33628    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33629        let avail_len = __input.len();
33630        let mut payload_buf = [0; Self::ENCODED_LEN];
33631        let mut buf = if avail_len < Self::ENCODED_LEN {
33632            payload_buf[0..avail_len].copy_from_slice(__input);
33633            Bytes::new(&payload_buf)
33634        } else {
33635            Bytes::new(__input)
33636        };
33637        let mut __struct = Self::default();
33638        __struct.usec = buf.get_u64_le();
33639        __struct.x = buf.get_f32_le();
33640        __struct.y = buf.get_f32_le();
33641        __struct.z = buf.get_f32_le();
33642        __struct.roll = buf.get_f32_le();
33643        __struct.pitch = buf.get_f32_le();
33644        __struct.yaw = buf.get_f32_le();
33645        for v in &mut __struct.covariance {
33646            let val = buf.get_f32_le();
33647            *v = val;
33648        }
33649        __struct.reset_counter = buf.get_u8();
33650        Ok(__struct)
33651    }
33652    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33653        let mut __tmp = BytesMut::new(bytes);
33654        #[allow(clippy::absurd_extreme_comparisons)]
33655        #[allow(unused_comparisons)]
33656        if __tmp.remaining() < Self::ENCODED_LEN {
33657            panic!(
33658                "buffer is too small (need {} bytes, but got {})",
33659                Self::ENCODED_LEN,
33660                __tmp.remaining(),
33661            )
33662        }
33663        __tmp.put_u64_le(self.usec);
33664        __tmp.put_f32_le(self.x);
33665        __tmp.put_f32_le(self.y);
33666        __tmp.put_f32_le(self.z);
33667        __tmp.put_f32_le(self.roll);
33668        __tmp.put_f32_le(self.pitch);
33669        __tmp.put_f32_le(self.yaw);
33670        if matches!(version, MavlinkVersion::V2) {
33671            for val in &self.covariance {
33672                __tmp.put_f32_le(*val);
33673            }
33674            __tmp.put_u8(self.reset_counter);
33675            let len = __tmp.len();
33676            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33677        } else {
33678            __tmp.len()
33679        }
33680    }
33681}
33682#[doc = "Speed estimate from a vision source."]
33683#[doc = ""]
33684#[doc = "ID: 103"]
33685#[derive(Debug, Clone, PartialEq)]
33686#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33687#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33688#[cfg_attr(feature = "ts", derive(TS))]
33689#[cfg_attr(feature = "ts", ts(export))]
33690pub struct VISION_SPEED_ESTIMATE_DATA {
33691    #[doc = "Timestamp (UNIX time or time since system boot)"]
33692    pub usec: u64,
33693    #[doc = "Global X speed"]
33694    pub x: f32,
33695    #[doc = "Global Y speed"]
33696    pub y: f32,
33697    #[doc = "Global Z speed"]
33698    pub z: f32,
33699    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
33700    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33701    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33702    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33703    pub covariance: [f32; 9],
33704    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33705    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33706    pub reset_counter: u8,
33707}
33708impl VISION_SPEED_ESTIMATE_DATA {
33709    pub const ENCODED_LEN: usize = 57usize;
33710    pub const DEFAULT: Self = Self {
33711        usec: 0_u64,
33712        x: 0.0_f32,
33713        y: 0.0_f32,
33714        z: 0.0_f32,
33715        covariance: [0.0_f32; 9usize],
33716        reset_counter: 0_u8,
33717    };
33718    #[cfg(feature = "arbitrary")]
33719    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33720        use arbitrary::{Arbitrary, Unstructured};
33721        let mut buf = [0u8; 1024];
33722        rng.fill_bytes(&mut buf);
33723        let mut unstructured = Unstructured::new(&buf);
33724        Self::arbitrary(&mut unstructured).unwrap_or_default()
33725    }
33726}
33727impl Default for VISION_SPEED_ESTIMATE_DATA {
33728    fn default() -> Self {
33729        Self::DEFAULT.clone()
33730    }
33731}
33732impl MessageData for VISION_SPEED_ESTIMATE_DATA {
33733    type Message = MavMessage;
33734    const ID: u32 = 103u32;
33735    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
33736    const EXTRA_CRC: u8 = 208u8;
33737    const ENCODED_LEN: usize = 57usize;
33738    fn deser(
33739        _version: MavlinkVersion,
33740        __input: &[u8],
33741    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33742        let avail_len = __input.len();
33743        let mut payload_buf = [0; Self::ENCODED_LEN];
33744        let mut buf = if avail_len < Self::ENCODED_LEN {
33745            payload_buf[0..avail_len].copy_from_slice(__input);
33746            Bytes::new(&payload_buf)
33747        } else {
33748            Bytes::new(__input)
33749        };
33750        let mut __struct = Self::default();
33751        __struct.usec = buf.get_u64_le();
33752        __struct.x = buf.get_f32_le();
33753        __struct.y = buf.get_f32_le();
33754        __struct.z = buf.get_f32_le();
33755        for v in &mut __struct.covariance {
33756            let val = buf.get_f32_le();
33757            *v = val;
33758        }
33759        __struct.reset_counter = buf.get_u8();
33760        Ok(__struct)
33761    }
33762    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33763        let mut __tmp = BytesMut::new(bytes);
33764        #[allow(clippy::absurd_extreme_comparisons)]
33765        #[allow(unused_comparisons)]
33766        if __tmp.remaining() < Self::ENCODED_LEN {
33767            panic!(
33768                "buffer is too small (need {} bytes, but got {})",
33769                Self::ENCODED_LEN,
33770                __tmp.remaining(),
33771            )
33772        }
33773        __tmp.put_u64_le(self.usec);
33774        __tmp.put_f32_le(self.x);
33775        __tmp.put_f32_le(self.y);
33776        __tmp.put_f32_le(self.z);
33777        if matches!(version, MavlinkVersion::V2) {
33778            for val in &self.covariance {
33779                __tmp.put_f32_le(*val);
33780            }
33781            __tmp.put_u8(self.reset_counter);
33782            let len = __tmp.len();
33783            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33784        } else {
33785            __tmp.len()
33786        }
33787    }
33788}
33789#[doc = "Cumulative distance traveled for each reported wheel."]
33790#[doc = ""]
33791#[doc = "ID: 9000"]
33792#[derive(Debug, Clone, PartialEq)]
33793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33795#[cfg_attr(feature = "ts", derive(TS))]
33796#[cfg_attr(feature = "ts", ts(export))]
33797pub struct WHEEL_DISTANCE_DATA {
33798    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33799    pub time_usec: u64,
33800    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
33801    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33802    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33803    pub distance: [f64; 16],
33804    #[doc = "Number of wheels reported."]
33805    pub count: u8,
33806}
33807impl WHEEL_DISTANCE_DATA {
33808    pub const ENCODED_LEN: usize = 137usize;
33809    pub const DEFAULT: Self = Self {
33810        time_usec: 0_u64,
33811        distance: [0.0_f64; 16usize],
33812        count: 0_u8,
33813    };
33814    #[cfg(feature = "arbitrary")]
33815    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33816        use arbitrary::{Arbitrary, Unstructured};
33817        let mut buf = [0u8; 1024];
33818        rng.fill_bytes(&mut buf);
33819        let mut unstructured = Unstructured::new(&buf);
33820        Self::arbitrary(&mut unstructured).unwrap_or_default()
33821    }
33822}
33823impl Default for WHEEL_DISTANCE_DATA {
33824    fn default() -> Self {
33825        Self::DEFAULT.clone()
33826    }
33827}
33828impl MessageData for WHEEL_DISTANCE_DATA {
33829    type Message = MavMessage;
33830    const ID: u32 = 9000u32;
33831    const NAME: &'static str = "WHEEL_DISTANCE";
33832    const EXTRA_CRC: u8 = 113u8;
33833    const ENCODED_LEN: usize = 137usize;
33834    fn deser(
33835        _version: MavlinkVersion,
33836        __input: &[u8],
33837    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33838        let avail_len = __input.len();
33839        let mut payload_buf = [0; Self::ENCODED_LEN];
33840        let mut buf = if avail_len < Self::ENCODED_LEN {
33841            payload_buf[0..avail_len].copy_from_slice(__input);
33842            Bytes::new(&payload_buf)
33843        } else {
33844            Bytes::new(__input)
33845        };
33846        let mut __struct = Self::default();
33847        __struct.time_usec = buf.get_u64_le();
33848        for v in &mut __struct.distance {
33849            let val = buf.get_f64_le();
33850            *v = val;
33851        }
33852        __struct.count = buf.get_u8();
33853        Ok(__struct)
33854    }
33855    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33856        let mut __tmp = BytesMut::new(bytes);
33857        #[allow(clippy::absurd_extreme_comparisons)]
33858        #[allow(unused_comparisons)]
33859        if __tmp.remaining() < Self::ENCODED_LEN {
33860            panic!(
33861                "buffer is too small (need {} bytes, but got {})",
33862                Self::ENCODED_LEN,
33863                __tmp.remaining(),
33864            )
33865        }
33866        __tmp.put_u64_le(self.time_usec);
33867        for val in &self.distance {
33868            __tmp.put_f64_le(*val);
33869        }
33870        __tmp.put_u8(self.count);
33871        if matches!(version, MavlinkVersion::V2) {
33872            let len = __tmp.len();
33873            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33874        } else {
33875            __tmp.len()
33876        }
33877    }
33878}
33879#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33880#[doc = ""]
33881#[doc = "ID: 299"]
33882#[derive(Debug, Clone, PartialEq)]
33883#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33884#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33885#[cfg_attr(feature = "ts", derive(TS))]
33886#[cfg_attr(feature = "ts", ts(export))]
33887pub struct WIFI_CONFIG_AP_DATA {
33888    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
33889    #[cfg_attr(feature = "ts", ts(type = "string"))]
33890    pub ssid: CharArray<32>,
33891    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
33892    #[cfg_attr(feature = "ts", ts(type = "string"))]
33893    pub password: CharArray<64>,
33894    #[doc = "WiFi Mode."]
33895    #[cfg_attr(feature = "serde", serde(default))]
33896    pub mode: WifiConfigApMode,
33897    #[doc = "Message acceptance response (sent back to GS)."]
33898    #[cfg_attr(feature = "serde", serde(default))]
33899    pub response: WifiConfigApResponse,
33900}
33901impl WIFI_CONFIG_AP_DATA {
33902    pub const ENCODED_LEN: usize = 98usize;
33903    pub const DEFAULT: Self = Self {
33904        ssid: CharArray::new([0_u8; 32usize]),
33905        password: CharArray::new([0_u8; 64usize]),
33906        mode: WifiConfigApMode::DEFAULT,
33907        response: WifiConfigApResponse::DEFAULT,
33908    };
33909    #[cfg(feature = "arbitrary")]
33910    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33911        use arbitrary::{Arbitrary, Unstructured};
33912        let mut buf = [0u8; 1024];
33913        rng.fill_bytes(&mut buf);
33914        let mut unstructured = Unstructured::new(&buf);
33915        Self::arbitrary(&mut unstructured).unwrap_or_default()
33916    }
33917}
33918impl Default for WIFI_CONFIG_AP_DATA {
33919    fn default() -> Self {
33920        Self::DEFAULT.clone()
33921    }
33922}
33923impl MessageData for WIFI_CONFIG_AP_DATA {
33924    type Message = MavMessage;
33925    const ID: u32 = 299u32;
33926    const NAME: &'static str = "WIFI_CONFIG_AP";
33927    const EXTRA_CRC: u8 = 19u8;
33928    const ENCODED_LEN: usize = 98usize;
33929    fn deser(
33930        _version: MavlinkVersion,
33931        __input: &[u8],
33932    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33933        let avail_len = __input.len();
33934        let mut payload_buf = [0; Self::ENCODED_LEN];
33935        let mut buf = if avail_len < Self::ENCODED_LEN {
33936            payload_buf[0..avail_len].copy_from_slice(__input);
33937            Bytes::new(&payload_buf)
33938        } else {
33939            Bytes::new(__input)
33940        };
33941        let mut __struct = Self::default();
33942        let mut tmp = [0_u8; 32usize];
33943        for v in &mut tmp {
33944            *v = buf.get_u8();
33945        }
33946        __struct.ssid = CharArray::new(tmp);
33947        let mut tmp = [0_u8; 64usize];
33948        for v in &mut tmp {
33949            *v = buf.get_u8();
33950        }
33951        __struct.password = CharArray::new(tmp);
33952        let tmp = buf.get_i8();
33953        __struct.mode =
33954            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33955                enum_type: "WifiConfigApMode",
33956                value: tmp as u64,
33957            })?;
33958        let tmp = buf.get_i8();
33959        __struct.response =
33960            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33961                enum_type: "WifiConfigApResponse",
33962                value: tmp as u64,
33963            })?;
33964        Ok(__struct)
33965    }
33966    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33967        let mut __tmp = BytesMut::new(bytes);
33968        #[allow(clippy::absurd_extreme_comparisons)]
33969        #[allow(unused_comparisons)]
33970        if __tmp.remaining() < Self::ENCODED_LEN {
33971            panic!(
33972                "buffer is too small (need {} bytes, but got {})",
33973                Self::ENCODED_LEN,
33974                __tmp.remaining(),
33975            )
33976        }
33977        for val in &self.ssid {
33978            __tmp.put_u8(*val);
33979        }
33980        for val in &self.password {
33981            __tmp.put_u8(*val);
33982        }
33983        if matches!(version, MavlinkVersion::V2) {
33984            __tmp.put_i8(self.mode as i8);
33985            __tmp.put_i8(self.response as i8);
33986            let len = __tmp.len();
33987            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33988        } else {
33989            __tmp.len()
33990        }
33991    }
33992}
33993#[doc = "Winch status."]
33994#[doc = ""]
33995#[doc = "ID: 9005"]
33996#[derive(Debug, Clone, PartialEq)]
33997#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33998#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33999#[cfg_attr(feature = "ts", derive(TS))]
34000#[cfg_attr(feature = "ts", ts(export))]
34001pub struct WINCH_STATUS_DATA {
34002    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
34003    pub time_usec: u64,
34004    #[doc = "Length of line released. NaN if unknown"]
34005    pub line_length: f32,
34006    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
34007    pub speed: f32,
34008    #[doc = "Tension on the line. NaN if unknown"]
34009    pub tension: f32,
34010    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
34011    pub voltage: f32,
34012    #[doc = "Current draw from the winch. NaN if unknown"]
34013    pub current: f32,
34014    #[doc = "Status flags"]
34015    pub status: MavWinchStatusFlag,
34016    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
34017    pub temperature: i16,
34018}
34019impl WINCH_STATUS_DATA {
34020    pub const ENCODED_LEN: usize = 34usize;
34021    pub const DEFAULT: Self = Self {
34022        time_usec: 0_u64,
34023        line_length: 0.0_f32,
34024        speed: 0.0_f32,
34025        tension: 0.0_f32,
34026        voltage: 0.0_f32,
34027        current: 0.0_f32,
34028        status: MavWinchStatusFlag::DEFAULT,
34029        temperature: 0_i16,
34030    };
34031    #[cfg(feature = "arbitrary")]
34032    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34033        use arbitrary::{Arbitrary, Unstructured};
34034        let mut buf = [0u8; 1024];
34035        rng.fill_bytes(&mut buf);
34036        let mut unstructured = Unstructured::new(&buf);
34037        Self::arbitrary(&mut unstructured).unwrap_or_default()
34038    }
34039}
34040impl Default for WINCH_STATUS_DATA {
34041    fn default() -> Self {
34042        Self::DEFAULT.clone()
34043    }
34044}
34045impl MessageData for WINCH_STATUS_DATA {
34046    type Message = MavMessage;
34047    const ID: u32 = 9005u32;
34048    const NAME: &'static str = "WINCH_STATUS";
34049    const EXTRA_CRC: u8 = 117u8;
34050    const ENCODED_LEN: usize = 34usize;
34051    fn deser(
34052        _version: MavlinkVersion,
34053        __input: &[u8],
34054    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34055        let avail_len = __input.len();
34056        let mut payload_buf = [0; Self::ENCODED_LEN];
34057        let mut buf = if avail_len < Self::ENCODED_LEN {
34058            payload_buf[0..avail_len].copy_from_slice(__input);
34059            Bytes::new(&payload_buf)
34060        } else {
34061            Bytes::new(__input)
34062        };
34063        let mut __struct = Self::default();
34064        __struct.time_usec = buf.get_u64_le();
34065        __struct.line_length = buf.get_f32_le();
34066        __struct.speed = buf.get_f32_le();
34067        __struct.tension = buf.get_f32_le();
34068        __struct.voltage = buf.get_f32_le();
34069        __struct.current = buf.get_f32_le();
34070        let tmp = buf.get_u32_le();
34071        __struct.status = MavWinchStatusFlag::from_bits(tmp as <MavWinchStatusFlag as Flags>::Bits)
34072            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
34073                flag_type: "MavWinchStatusFlag",
34074                value: tmp as u64,
34075            })?;
34076        __struct.temperature = buf.get_i16_le();
34077        Ok(__struct)
34078    }
34079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34080        let mut __tmp = BytesMut::new(bytes);
34081        #[allow(clippy::absurd_extreme_comparisons)]
34082        #[allow(unused_comparisons)]
34083        if __tmp.remaining() < Self::ENCODED_LEN {
34084            panic!(
34085                "buffer is too small (need {} bytes, but got {})",
34086                Self::ENCODED_LEN,
34087                __tmp.remaining(),
34088            )
34089        }
34090        __tmp.put_u64_le(self.time_usec);
34091        __tmp.put_f32_le(self.line_length);
34092        __tmp.put_f32_le(self.speed);
34093        __tmp.put_f32_le(self.tension);
34094        __tmp.put_f32_le(self.voltage);
34095        __tmp.put_f32_le(self.current);
34096        __tmp.put_u32_le(self.status.bits() as u32);
34097        __tmp.put_i16_le(self.temperature);
34098        if matches!(version, MavlinkVersion::V2) {
34099            let len = __tmp.len();
34100            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34101        } else {
34102            __tmp.len()
34103        }
34104    }
34105}
34106#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
34107#[doc = ""]
34108#[doc = "ID: 231"]
34109#[derive(Debug, Clone, PartialEq)]
34110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34111#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34112#[cfg_attr(feature = "ts", derive(TS))]
34113#[cfg_attr(feature = "ts", ts(export))]
34114pub struct WIND_COV_DATA {
34115    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
34116    pub time_usec: u64,
34117    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
34118    pub wind_x: f32,
34119    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
34120    pub wind_y: f32,
34121    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
34122    pub wind_z: f32,
34123    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
34124    pub var_horiz: f32,
34125    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
34126    pub var_vert: f32,
34127    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
34128    pub wind_alt: f32,
34129    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
34130    pub horiz_accuracy: f32,
34131    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
34132    pub vert_accuracy: f32,
34133}
34134impl WIND_COV_DATA {
34135    pub const ENCODED_LEN: usize = 40usize;
34136    pub const DEFAULT: Self = Self {
34137        time_usec: 0_u64,
34138        wind_x: 0.0_f32,
34139        wind_y: 0.0_f32,
34140        wind_z: 0.0_f32,
34141        var_horiz: 0.0_f32,
34142        var_vert: 0.0_f32,
34143        wind_alt: 0.0_f32,
34144        horiz_accuracy: 0.0_f32,
34145        vert_accuracy: 0.0_f32,
34146    };
34147    #[cfg(feature = "arbitrary")]
34148    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34149        use arbitrary::{Arbitrary, Unstructured};
34150        let mut buf = [0u8; 1024];
34151        rng.fill_bytes(&mut buf);
34152        let mut unstructured = Unstructured::new(&buf);
34153        Self::arbitrary(&mut unstructured).unwrap_or_default()
34154    }
34155}
34156impl Default for WIND_COV_DATA {
34157    fn default() -> Self {
34158        Self::DEFAULT.clone()
34159    }
34160}
34161impl MessageData for WIND_COV_DATA {
34162    type Message = MavMessage;
34163    const ID: u32 = 231u32;
34164    const NAME: &'static str = "WIND_COV";
34165    const EXTRA_CRC: u8 = 105u8;
34166    const ENCODED_LEN: usize = 40usize;
34167    fn deser(
34168        _version: MavlinkVersion,
34169        __input: &[u8],
34170    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34171        let avail_len = __input.len();
34172        let mut payload_buf = [0; Self::ENCODED_LEN];
34173        let mut buf = if avail_len < Self::ENCODED_LEN {
34174            payload_buf[0..avail_len].copy_from_slice(__input);
34175            Bytes::new(&payload_buf)
34176        } else {
34177            Bytes::new(__input)
34178        };
34179        let mut __struct = Self::default();
34180        __struct.time_usec = buf.get_u64_le();
34181        __struct.wind_x = buf.get_f32_le();
34182        __struct.wind_y = buf.get_f32_le();
34183        __struct.wind_z = buf.get_f32_le();
34184        __struct.var_horiz = buf.get_f32_le();
34185        __struct.var_vert = buf.get_f32_le();
34186        __struct.wind_alt = buf.get_f32_le();
34187        __struct.horiz_accuracy = buf.get_f32_le();
34188        __struct.vert_accuracy = buf.get_f32_le();
34189        Ok(__struct)
34190    }
34191    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34192        let mut __tmp = BytesMut::new(bytes);
34193        #[allow(clippy::absurd_extreme_comparisons)]
34194        #[allow(unused_comparisons)]
34195        if __tmp.remaining() < Self::ENCODED_LEN {
34196            panic!(
34197                "buffer is too small (need {} bytes, but got {})",
34198                Self::ENCODED_LEN,
34199                __tmp.remaining(),
34200            )
34201        }
34202        __tmp.put_u64_le(self.time_usec);
34203        __tmp.put_f32_le(self.wind_x);
34204        __tmp.put_f32_le(self.wind_y);
34205        __tmp.put_f32_le(self.wind_z);
34206        __tmp.put_f32_le(self.var_horiz);
34207        __tmp.put_f32_le(self.var_vert);
34208        __tmp.put_f32_le(self.wind_alt);
34209        __tmp.put_f32_le(self.horiz_accuracy);
34210        __tmp.put_f32_le(self.vert_accuracy);
34211        if matches!(version, MavlinkVersion::V2) {
34212            let len = __tmp.len();
34213            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34214        } else {
34215            __tmp.len()
34216        }
34217    }
34218}
34219#[derive(Clone, PartialEq, Debug)]
34220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34221#[cfg_attr(feature = "serde", serde(tag = "type"))]
34222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34223#[cfg_attr(feature = "ts", derive(TS))]
34224#[cfg_attr(feature = "ts", ts(export))]
34225#[repr(u32)]
34226pub enum MavMessage {
34227    #[doc = "Set the vehicle attitude and body angular rates."]
34228    #[doc = ""]
34229    #[doc = "ID: 140"]
34230    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
34231    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
34232    #[doc = ""]
34233    #[doc = "ID: 375"]
34234    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
34235    #[doc = "The location and information of an ADSB vehicle."]
34236    #[doc = ""]
34237    #[doc = "ID: 246"]
34238    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
34239    #[doc = "The location and information of an AIS vessel."]
34240    #[doc = ""]
34241    #[doc = "ID: 301"]
34242    AIS_VESSEL(AIS_VESSEL_DATA),
34243    #[doc = "The current system altitude."]
34244    #[doc = ""]
34245    #[doc = "ID: 141"]
34246    ALTITUDE(ALTITUDE_DATA),
34247    #[doc = "ASL-fixed-wing controller data."]
34248    #[doc = ""]
34249    #[doc = "ID: 8004"]
34250    ASLCTRL_DATA(ASLCTRL_DATA_DATA),
34251    #[doc = "ASL-fixed-wing controller debug data."]
34252    #[doc = ""]
34253    #[doc = "ID: 8005"]
34254    ASLCTRL_DEBUG(ASLCTRL_DEBUG_DATA),
34255    #[doc = "Extended state information for ASLUAVs."]
34256    #[doc = ""]
34257    #[doc = "ID: 8006"]
34258    ASLUAV_STATUS(ASLUAV_STATUS_DATA),
34259    #[doc = "Off-board controls/commands for ASLUAVs."]
34260    #[doc = ""]
34261    #[doc = "ID: 8008"]
34262    ASL_OBCTRL(ASL_OBCTRL_DATA),
34263    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
34264    #[doc = ""]
34265    #[doc = "ID: 30"]
34266    ATTITUDE(ATTITUDE_DATA),
34267    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
34268    #[doc = ""]
34269    #[doc = "ID: 31"]
34270    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
34271    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
34272    #[doc = ""]
34273    #[doc = "ID: 61"]
34274    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
34275    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
34276    #[doc = ""]
34277    #[doc = "ID: 83"]
34278    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
34279    #[doc = "Motion capture attitude and position."]
34280    #[doc = ""]
34281    #[doc = "ID: 138"]
34282    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
34283    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
34284    #[doc = ""]
34285    #[doc = "ID: 7"]
34286    AUTH_KEY(AUTH_KEY_DATA),
34287    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
34288    #[doc = ""]
34289    #[doc = "ID: 286"]
34290    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
34291    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
34292    #[doc = ""]
34293    #[doc = "ID: 148"]
34294    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
34295    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
34296    #[doc = ""]
34297    #[doc = "ID: 435"]
34298    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
34299    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
34300    #[doc = ""]
34301    #[doc = "ID: 437"]
34302    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
34303    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
34304    #[doc = ""]
34305    #[doc = "ID: 372"]
34306    BATTERY_INFO(BATTERY_INFO_DATA),
34307    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
34308    #[doc = ""]
34309    #[doc = "ID: 147"]
34310    BATTERY_STATUS(BATTERY_STATUS_DATA),
34311    #[doc = "Report button state change."]
34312    #[doc = ""]
34313    #[doc = "ID: 257"]
34314    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
34315    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34316    #[doc = ""]
34317    #[doc = "ID: 262"]
34318    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
34319    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34320    #[doc = ""]
34321    #[doc = "ID: 271"]
34322    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
34323    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
34324    #[doc = ""]
34325    #[doc = "ID: 263"]
34326    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
34327    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34328    #[doc = ""]
34329    #[doc = "ID: 259"]
34330    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
34331    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34332    #[doc = ""]
34333    #[doc = "ID: 260"]
34334    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
34335    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
34336    #[doc = ""]
34337    #[doc = "ID: 277"]
34338    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
34339    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
34340    #[doc = ""]
34341    #[doc = "ID: 276"]
34342    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
34343    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
34344    #[doc = ""]
34345    #[doc = "ID: 275"]
34346    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
34347    #[doc = "Camera-IMU triggering and synchronisation message."]
34348    #[doc = ""]
34349    #[doc = "ID: 112"]
34350    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
34351    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
34352    #[doc = ""]
34353    #[doc = "ID: 387"]
34354    CANFD_FRAME(CANFD_FRAME_DATA),
34355    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
34356    #[doc = ""]
34357    #[doc = "ID: 388"]
34358    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
34359    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
34360    #[doc = ""]
34361    #[doc = "ID: 386"]
34362    CAN_FRAME(CAN_FRAME_DATA),
34363    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
34364    #[doc = ""]
34365    #[doc = "ID: 336"]
34366    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
34367    #[doc = "Report current used cellular network status."]
34368    #[doc = ""]
34369    #[doc = "ID: 334"]
34370    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
34371    #[doc = "Request to control this MAV."]
34372    #[doc = ""]
34373    #[doc = "ID: 5"]
34374    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
34375    #[doc = "Accept / deny control of this MAV."]
34376    #[doc = ""]
34377    #[doc = "ID: 6"]
34378    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
34379    #[doc = "Information about a potential collision."]
34380    #[doc = ""]
34381    #[doc = "ID: 247"]
34382    COLLISION(COLLISION_DATA),
34383    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34384    #[doc = ""]
34385    #[doc = "ID: 77"]
34386    COMMAND_ACK(COMMAND_ACK_DATA),
34387    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34388    #[doc = ""]
34389    #[doc = "ID: 80"]
34390    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
34391    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34392    #[doc = ""]
34393    #[doc = "ID: 75"]
34394    COMMAND_INT(COMMAND_INT_DATA),
34395    #[doc = "Message encoding a command with parameters as scaled integers and additional metadata. Scaling depends on the actual command value."]
34396    #[doc = ""]
34397    #[doc = "ID: 223"]
34398    COMMAND_INT_STAMPED(COMMAND_INT_STAMPED_DATA),
34399    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34400    #[doc = ""]
34401    #[doc = "ID: 76"]
34402    COMMAND_LONG(COMMAND_LONG_DATA),
34403    #[doc = "Send a command with up to seven parameters to the MAV and additional metadata."]
34404    #[doc = ""]
34405    #[doc = "ID: 224"]
34406    COMMAND_LONG_STAMPED(COMMAND_LONG_STAMPED_DATA),
34407    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
34408    #[doc = ""]
34409    #[doc = "ID: 395"]
34410    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
34411    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
34412    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
34413    #[doc = ""]
34414    #[doc = "ID: 396"]
34415    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
34416    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
34417    #[doc = ""]
34418    #[doc = "ID: 397"]
34419    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
34420    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
34421    #[doc = ""]
34422    #[doc = "ID: 146"]
34423    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
34424    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
34425    #[doc = ""]
34426    #[doc = "ID: 411"]
34427    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
34428    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
34429    #[doc = ""]
34430    #[doc = "ID: 436"]
34431    CURRENT_MODE(CURRENT_MODE_DATA),
34432    #[doc = "Data stream status information."]
34433    #[doc = ""]
34434    #[doc = "ID: 67"]
34435    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
34436    DATA_STREAM(DATA_STREAM_DATA),
34437    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
34438    #[doc = ""]
34439    #[doc = "ID: 130"]
34440    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
34441    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
34442    #[doc = ""]
34443    #[doc = "ID: 254"]
34444    DEBUG(DEBUG_DATA),
34445    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
34446    #[doc = ""]
34447    #[doc = "ID: 350"]
34448    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
34449    #[doc = "To debug something using a named 3D vector."]
34450    #[doc = ""]
34451    #[doc = "ID: 250"]
34452    DEBUG_VECT(DEBUG_VECT_DATA),
34453    #[doc = "Distance sensor information for an onboard rangefinder."]
34454    #[doc = ""]
34455    #[doc = "ID: 132"]
34456    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
34457    #[doc = "EFI status output."]
34458    #[doc = ""]
34459    #[doc = "ID: 225"]
34460    EFI_STATUS(EFI_STATUS_DATA),
34461    #[doc = "Extended EKF state estimates for ASLUAVs."]
34462    #[doc = ""]
34463    #[doc = "ID: 8007"]
34464    EKF_EXT(EKF_EXT_DATA),
34465    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
34466    #[doc = ""]
34467    #[doc = "ID: 131"]
34468    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
34469    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
34470    #[doc = ""]
34471    #[doc = "ID: 290"]
34472    ESC_INFO(ESC_INFO_DATA),
34473    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
34474    #[doc = ""]
34475    #[doc = "ID: 291"]
34476    ESC_STATUS(ESC_STATUS_DATA),
34477    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
34478    #[doc = ""]
34479    #[doc = "ID: 230"]
34480    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
34481    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
34482    #[doc = ""]
34483    #[doc = "ID: 410"]
34484    EVENT(EVENT_DATA),
34485    #[doc = "Provides state for additional features."]
34486    #[doc = ""]
34487    #[doc = "ID: 245"]
34488    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
34489    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
34490    #[doc = ""]
34491    #[doc = "ID: 162"]
34492    FENCE_STATUS(FENCE_STATUS_DATA),
34493    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
34494    #[doc = ""]
34495    #[doc = "ID: 110"]
34496    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
34497    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
34498    #[doc = ""]
34499    #[doc = "ID: 264"]
34500    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
34501    #[doc = "Current motion information from a designated system."]
34502    #[doc = ""]
34503    #[doc = "ID: 144"]
34504    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
34505    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
34506    #[doc = ""]
34507    #[doc = "ID: 371"]
34508    FUEL_STATUS(FUEL_STATUS_DATA),
34509    #[doc = "Fixed-wing soaring (i.e. thermal seeking) data."]
34510    #[doc = ""]
34511    #[doc = "ID: 8011"]
34512    FW_SOARING_DATA(FW_SOARING_DATA_DATA),
34513    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
34514    #[doc = ""]
34515    #[doc = "ID: 373"]
34516    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
34517    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
34518    #[doc = ""]
34519    #[doc = "ID: 285"]
34520    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
34521    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
34522    #[doc = ""]
34523    #[doc = "ID: 283"]
34524    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
34525    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
34526    #[doc = ""]
34527    #[doc = "ID: 284"]
34528    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
34529    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
34530    #[doc = ""]
34531    #[doc = "ID: 280"]
34532    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
34533    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
34534    #[doc = ""]
34535    #[doc = "ID: 282"]
34536    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
34537    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
34538    #[doc = ""]
34539    #[doc = "ID: 288"]
34540    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
34541    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
34542    #[doc = ""]
34543    #[doc = "ID: 287"]
34544    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
34545    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
34546    #[doc = ""]
34547    #[doc = "ID: 281"]
34548    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
34549    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
34550    #[doc = ""]
34551    #[doc = "ID: 33"]
34552    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
34553    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
34554    #[doc = ""]
34555    #[doc = "ID: 63"]
34556    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
34557    #[doc = "Global position/attitude estimate from a vision source."]
34558    #[doc = ""]
34559    #[doc = "ID: 101"]
34560    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
34561    #[doc = "Second GPS data."]
34562    #[doc = ""]
34563    #[doc = "ID: 124"]
34564    GPS2_RAW(GPS2_RAW_DATA),
34565    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
34566    #[doc = ""]
34567    #[doc = "ID: 128"]
34568    GPS2_RTK(GPS2_RTK_DATA),
34569    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
34570    #[doc = ""]
34571    #[doc = "ID: 49"]
34572    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
34573    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
34574    #[doc = ""]
34575    #[doc = "ID: 123"]
34576    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
34577    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
34578    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
34579    #[doc = ""]
34580    #[doc = "ID: 232"]
34581    GPS_INPUT(GPS_INPUT_DATA),
34582    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
34583    #[doc = ""]
34584    #[doc = "ID: 24"]
34585    GPS_RAW_INT(GPS_RAW_INT_DATA),
34586    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
34587    #[doc = ""]
34588    #[doc = "ID: 233"]
34589    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
34590    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
34591    #[doc = ""]
34592    #[doc = "ID: 127"]
34593    GPS_RTK(GPS_RTK_DATA),
34594    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
34595    #[doc = ""]
34596    #[doc = "ID: 25"]
34597    GPS_STATUS(GPS_STATUS_DATA),
34598    #[doc = "Status of GSM modem (connected to onboard computer)."]
34599    #[doc = ""]
34600    #[doc = "ID: 8014"]
34601    GSM_LINK_STATUS(GSM_LINK_STATUS_DATA),
34602    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
34603    #[doc = ""]
34604    #[doc = "ID: 0"]
34605    HEARTBEAT(HEARTBEAT_DATA),
34606    #[doc = "The IMU readings in SI units in NED body frame."]
34607    #[doc = ""]
34608    #[doc = "ID: 105"]
34609    HIGHRES_IMU(HIGHRES_IMU_DATA),
34610    #[doc = "Message appropriate for high latency connections like Iridium."]
34611    #[doc = ""]
34612    #[doc = "ID: 234"]
34613    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
34614    HIGH_LATENCY(HIGH_LATENCY_DATA),
34615    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
34616    #[doc = ""]
34617    #[doc = "ID: 235"]
34618    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
34619    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
34620    #[doc = ""]
34621    #[doc = "ID: 93"]
34622    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
34623    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
34624    #[doc = ""]
34625    #[doc = "ID: 91"]
34626    HIL_CONTROLS(HIL_CONTROLS_DATA),
34627    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
34628    #[doc = ""]
34629    #[doc = "ID: 113"]
34630    HIL_GPS(HIL_GPS_DATA),
34631    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
34632    #[doc = ""]
34633    #[doc = "ID: 114"]
34634    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
34635    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
34636    #[doc = ""]
34637    #[doc = "ID: 92"]
34638    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
34639    #[doc = "The IMU readings in SI units in NED body frame."]
34640    #[doc = ""]
34641    #[doc = "ID: 107"]
34642    HIL_SENSOR(HIL_SENSOR_DATA),
34643    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34644    #[doc = ""]
34645    #[doc = "ID: 90"]
34646    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
34647    HIL_STATE(HIL_STATE_DATA),
34648    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34649    #[doc = ""]
34650    #[doc = "ID: 115"]
34651    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
34652    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
34653    #[doc = ""]
34654    #[doc = "ID: 242"]
34655    HOME_POSITION(HOME_POSITION_DATA),
34656    #[doc = "Temperature and humidity from hygrometer."]
34657    #[doc = ""]
34658    #[doc = "ID: 12920"]
34659    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
34660    #[doc = "Illuminator status."]
34661    #[doc = ""]
34662    #[doc = "ID: 440"]
34663    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
34664    #[doc = "Status of the Iridium SBD link."]
34665    #[doc = ""]
34666    #[doc = "ID: 335"]
34667    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
34668    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
34669    #[doc = ""]
34670    #[doc = "ID: 149"]
34671    LANDING_TARGET(LANDING_TARGET_DATA),
34672    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
34673    #[doc = ""]
34674    #[doc = "ID: 8"]
34675    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
34676    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34677    #[doc = ""]
34678    #[doc = "ID: 32"]
34679    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
34680    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34681    #[doc = ""]
34682    #[doc = "ID: 64"]
34683    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
34684    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34685    #[doc = ""]
34686    #[doc = "ID: 89"]
34687    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
34688    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
34689    #[doc = ""]
34690    #[doc = "ID: 268"]
34691    LOGGING_ACK(LOGGING_ACK_DATA),
34692    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
34693    #[doc = ""]
34694    #[doc = "ID: 266"]
34695    LOGGING_DATA(LOGGING_DATA_DATA),
34696    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
34697    #[doc = ""]
34698    #[doc = "ID: 267"]
34699    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
34700    #[doc = "Reply to LOG_REQUEST_DATA."]
34701    #[doc = ""]
34702    #[doc = "ID: 120"]
34703    LOG_DATA(LOG_DATA_DATA),
34704    #[doc = "Reply to LOG_REQUEST_LIST."]
34705    #[doc = ""]
34706    #[doc = "ID: 118"]
34707    LOG_ENTRY(LOG_ENTRY_DATA),
34708    #[doc = "Erase all logs."]
34709    #[doc = ""]
34710    #[doc = "ID: 121"]
34711    LOG_ERASE(LOG_ERASE_DATA),
34712    #[doc = "Request a chunk of a log."]
34713    #[doc = ""]
34714    #[doc = "ID: 119"]
34715    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
34716    #[doc = "Stop log transfer and resume normal logging."]
34717    #[doc = ""]
34718    #[doc = "ID: 122"]
34719    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
34720    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
34721    #[doc = ""]
34722    #[doc = "ID: 117"]
34723    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
34724    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
34725    #[doc = ""]
34726    #[doc = "ID: 192"]
34727    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
34728    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
34729    #[doc = ""]
34730    #[doc = "ID: 69"]
34731    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
34732    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
34733    #[doc = ""]
34734    #[doc = "ID: 81"]
34735    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
34736    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34737    #[doc = ""]
34738    #[doc = "ID: 249"]
34739    MEMORY_VECT(MEMORY_VECT_DATA),
34740    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
34741    #[doc = ""]
34742    #[doc = "ID: 244"]
34743    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
34744    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
34745    #[doc = ""]
34746    #[doc = "ID: 47"]
34747    MISSION_ACK(MISSION_ACK_DATA),
34748    #[doc = "Delete all mission items at once."]
34749    #[doc = ""]
34750    #[doc = "ID: 45"]
34751    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
34752    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
34753    #[doc = ""]
34754    #[doc = "ID: 44"]
34755    MISSION_COUNT(MISSION_COUNT_DATA),
34756    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
34757    #[doc = ""]
34758    #[doc = "ID: 42"]
34759    MISSION_CURRENT(MISSION_CURRENT_DATA),
34760    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34761    #[doc = ""]
34762    #[doc = "ID: 39"]
34763    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
34764    MISSION_ITEM(MISSION_ITEM_DATA),
34765    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34766    #[doc = ""]
34767    #[doc = "ID: 73"]
34768    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
34769    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
34770    #[doc = ""]
34771    #[doc = "ID: 46"]
34772    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
34773    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
34774    #[doc = ""]
34775    #[doc = "ID: 40"]
34776    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
34777    MISSION_REQUEST(MISSION_REQUEST_DATA),
34778    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
34779    #[doc = ""]
34780    #[doc = "ID: 51"]
34781    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
34782    #[doc = "Request the overall list of mission items from the system/component."]
34783    #[doc = ""]
34784    #[doc = "ID: 43"]
34785    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
34786    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
34787    #[doc = ""]
34788    #[doc = "ID: 37"]
34789    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
34790    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
34791    #[doc = ""]
34792    #[doc = "ID: 41"]
34793    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
34794    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
34795    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
34796    #[doc = ""]
34797    #[doc = "ID: 38"]
34798    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
34799    #[doc = "Orientation of a mount."]
34800    #[doc = ""]
34801    #[doc = "ID: 265"]
34802    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
34803    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
34804    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34805    #[doc = ""]
34806    #[doc = "ID: 251"]
34807    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
34808    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34809    #[doc = ""]
34810    #[doc = "ID: 252"]
34811    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
34812    #[doc = "The state of the navigation and position controller."]
34813    #[doc = ""]
34814    #[doc = "ID: 62"]
34815    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
34816    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
34817    #[doc = ""]
34818    #[doc = "ID: 330"]
34819    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
34820    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
34821    #[doc = ""]
34822    #[doc = "ID: 331"]
34823    ODOMETRY(ODOMETRY_DATA),
34824    #[doc = "Hardware status sent by an onboard computer."]
34825    #[doc = ""]
34826    #[doc = "ID: 390"]
34827    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
34828    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
34829    #[doc = ""]
34830    #[doc = "ID: 12918"]
34831    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
34832    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
34833    #[doc = ""]
34834    #[doc = "ID: 12902"]
34835    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
34836    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
34837    #[doc = ""]
34838    #[doc = "ID: 12900"]
34839    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
34840    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
34841    #[doc = ""]
34842    #[doc = "ID: 12901"]
34843    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
34844    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
34845    #[doc = ""]
34846    #[doc = "ID: 12915"]
34847    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
34848    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
34849    #[doc = ""]
34850    #[doc = "ID: 12905"]
34851    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
34852    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
34853    #[doc = ""]
34854    #[doc = "ID: 12903"]
34855    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
34856    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
34857    #[doc = ""]
34858    #[doc = "ID: 12904"]
34859    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
34860    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
34861    #[doc = ""]
34862    #[doc = "ID: 12919"]
34863    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
34864    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
34865    #[doc = ""]
34866    #[doc = "ID: 100"]
34867    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
34868    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
34869    #[doc = ""]
34870    #[doc = "ID: 106"]
34871    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
34872    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
34873    #[doc = ""]
34874    #[doc = "ID: 360"]
34875    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
34876    #[doc = "Response from a PARAM_EXT_SET message."]
34877    #[doc = ""]
34878    #[doc = "ID: 324"]
34879    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
34880    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
34881    #[doc = ""]
34882    #[doc = "ID: 321"]
34883    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
34884    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
34885    #[doc = ""]
34886    #[doc = "ID: 320"]
34887    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
34888    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
34889    #[doc = ""]
34890    #[doc = "ID: 323"]
34891    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
34892    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
34893    #[doc = ""]
34894    #[doc = "ID: 322"]
34895    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
34896    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
34897    #[doc = ""]
34898    #[doc = "ID: 50"]
34899    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
34900    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34901    #[doc = ""]
34902    #[doc = "ID: 21"]
34903    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
34904    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
34905    #[doc = ""]
34906    #[doc = "ID: 20"]
34907    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
34908    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34909    #[doc = ""]
34910    #[doc = "ID: 23"]
34911    PARAM_SET(PARAM_SET_DATA),
34912    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34913    #[doc = ""]
34914    #[doc = "ID: 22"]
34915    PARAM_VALUE(PARAM_VALUE_DATA),
34916    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
34917    #[doc = ""]
34918    #[doc = "ID: 4"]
34919    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
34920    PING(PING_DATA),
34921    #[doc = "Control vehicle tone generation (buzzer)."]
34922    #[doc = ""]
34923    #[doc = "ID: 258"]
34924    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
34925    PLAY_TUNE(PLAY_TUNE_DATA),
34926    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
34927    #[doc = ""]
34928    #[doc = "ID: 400"]
34929    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
34930    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
34931    #[doc = ""]
34932    #[doc = "ID: 87"]
34933    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
34934    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
34935    #[doc = ""]
34936    #[doc = "ID: 85"]
34937    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
34938    #[doc = "Power supply status."]
34939    #[doc = ""]
34940    #[doc = "ID: 125"]
34941    POWER_STATUS(POWER_STATUS_DATA),
34942    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
34943    #[doc = ""]
34944    #[doc = "ID: 300"]
34945    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
34946    #[doc = "Status generated by radio and injected into MAVLink stream."]
34947    #[doc = ""]
34948    #[doc = "ID: 109"]
34949    RADIO_STATUS(RADIO_STATUS_DATA),
34950    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
34951    #[doc = ""]
34952    #[doc = "ID: 27"]
34953    RAW_IMU(RAW_IMU_DATA),
34954    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
34955    #[doc = ""]
34956    #[doc = "ID: 28"]
34957    RAW_PRESSURE(RAW_PRESSURE_DATA),
34958    #[doc = "RPM sensor data message."]
34959    #[doc = ""]
34960    #[doc = "ID: 339"]
34961    RAW_RPM(RAW_RPM_DATA),
34962    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34963    #[doc = ""]
34964    #[doc = "ID: 65"]
34965    RC_CHANNELS(RC_CHANNELS_DATA),
34966    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
34967    #[doc = ""]
34968    #[doc = "ID: 70"]
34969    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
34970    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34971    #[doc = ""]
34972    #[doc = "ID: 35"]
34973    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
34974    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
34975    #[doc = ""]
34976    #[doc = "ID: 34"]
34977    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
34978    #[doc = "Request a data stream."]
34979    #[doc = ""]
34980    #[doc = "ID: 66"]
34981    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
34982    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
34983    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
34984    #[doc = ""]
34985    #[doc = "ID: 412"]
34986    REQUEST_EVENT(REQUEST_EVENT_DATA),
34987    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
34988    #[doc = ""]
34989    #[doc = "ID: 142"]
34990    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
34991    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
34992    #[doc = ""]
34993    #[doc = "ID: 413"]
34994    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
34995    #[doc = "Read out the safety zone the MAV currently assumes."]
34996    #[doc = ""]
34997    #[doc = "ID: 55"]
34998    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
34999    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
35000    #[doc = ""]
35001    #[doc = "ID: 54"]
35002    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
35003    #[doc = "Status of the SatCom link."]
35004    #[doc = ""]
35005    #[doc = "ID: 8015"]
35006    SATCOM_LINK_STATUS(SATCOM_LINK_STATUS_DATA),
35007    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
35008    #[doc = ""]
35009    #[doc = "ID: 26"]
35010    SCALED_IMU(SCALED_IMU_DATA),
35011    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
35012    #[doc = ""]
35013    #[doc = "ID: 116"]
35014    SCALED_IMU2(SCALED_IMU2_DATA),
35015    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
35016    #[doc = ""]
35017    #[doc = "ID: 129"]
35018    SCALED_IMU3(SCALED_IMU3_DATA),
35019    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
35020    #[doc = ""]
35021    #[doc = "ID: 29"]
35022    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
35023    #[doc = "Barometer readings for 2nd barometer."]
35024    #[doc = ""]
35025    #[doc = "ID: 137"]
35026    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
35027    #[doc = "Barometer readings for 3rd barometer."]
35028    #[doc = ""]
35029    #[doc = "ID: 143"]
35030    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
35031    #[doc = "Monitoring of sensorpod status."]
35032    #[doc = ""]
35033    #[doc = "ID: 8012"]
35034    SENSORPOD_STATUS(SENSORPOD_STATUS_DATA),
35035    #[doc = "Calibrated airflow angle measurements."]
35036    #[doc = ""]
35037    #[doc = "ID: 8016"]
35038    SENSOR_AIRFLOW_ANGLES(SENSOR_AIRFLOW_ANGLES_DATA),
35039    #[doc = "Atmospheric sensors (temperature, humidity, ...)."]
35040    #[doc = ""]
35041    #[doc = "ID: 8009"]
35042    SENS_ATMOS(SENS_ATMOS_DATA),
35043    #[doc = "Battery pack monitoring data for Li-Ion batteries."]
35044    #[doc = ""]
35045    #[doc = "ID: 8010"]
35046    SENS_BATMON(SENS_BATMON_DATA),
35047    #[doc = "Maximum Power Point Tracker (MPPT) sensor data for solar module power performance tracking."]
35048    #[doc = ""]
35049    #[doc = "ID: 8003"]
35050    SENS_MPPT(SENS_MPPT_DATA),
35051    #[doc = "Voltage and current sensor data."]
35052    #[doc = ""]
35053    #[doc = "ID: 8002"]
35054    SENS_POWER(SENS_POWER_DATA),
35055    #[doc = "Monitoring of power board status."]
35056    #[doc = ""]
35057    #[doc = "ID: 8013"]
35058    SENS_POWER_BOARD(SENS_POWER_BOARD_DATA),
35059    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
35060    #[doc = ""]
35061    #[doc = "ID: 126"]
35062    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
35063    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
35064    #[doc = ""]
35065    #[doc = "ID: 36"]
35066    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
35067    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
35068    #[doc = ""]
35069    #[doc = "ID: 256"]
35070    SETUP_SIGNING(SETUP_SIGNING_DATA),
35071    #[doc = "Set the vehicle attitude and body angular rates."]
35072    #[doc = ""]
35073    #[doc = "ID: 139"]
35074    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
35075    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
35076    #[doc = ""]
35077    #[doc = "ID: 82"]
35078    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
35079    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
35080    #[doc = ""]
35081    #[doc = "ID: 48"]
35082    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
35083    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
35084    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
35085    #[doc = ""]
35086    #[doc = "ID: 243"]
35087    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
35088    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
35089    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
35090    #[doc = ""]
35091    #[doc = "ID: 11"]
35092    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
35093    SET_MODE(SET_MODE_DATA),
35094    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
35095    #[doc = ""]
35096    #[doc = "ID: 86"]
35097    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
35098    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
35099    #[doc = ""]
35100    #[doc = "ID: 84"]
35101    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
35102    #[doc = "Status of simulation environment, if used."]
35103    #[doc = ""]
35104    #[doc = "ID: 108"]
35105    SIM_STATE(SIM_STATE_DATA),
35106    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
35107    #[doc = ""]
35108    #[doc = "ID: 370"]
35109    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
35110    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
35111    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
35112    #[doc = ""]
35113    #[doc = "ID: 253"]
35114    STATUSTEXT(STATUSTEXT_DATA),
35115    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
35116    #[doc = ""]
35117    #[doc = "ID: 261"]
35118    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
35119    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
35120    #[doc = ""]
35121    #[doc = "ID: 401"]
35122    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
35123    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
35124    #[doc = ""]
35125    #[doc = "ID: 2"]
35126    SYSTEM_TIME(SYSTEM_TIME_DATA),
35127    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
35128    #[doc = ""]
35129    #[doc = "ID: 1"]
35130    SYS_STATUS(SYS_STATUS_DATA),
35131    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
35132    #[doc = ""]
35133    #[doc = "ID: 135"]
35134    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
35135    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35136    #[doc = ""]
35137    #[doc = "ID: 134"]
35138    TERRAIN_DATA(TERRAIN_DATA_DATA),
35139    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35140    #[doc = ""]
35141    #[doc = "ID: 136"]
35142    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
35143    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35144    #[doc = ""]
35145    #[doc = "ID: 133"]
35146    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
35147    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
35148    #[doc = ""]
35149    #[doc = "ID: 111"]
35150    TIMESYNC(TIMESYNC_DATA),
35151    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
35152    #[doc = ""]
35153    #[doc = "ID: 380"]
35154    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
35155    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
35156    #[doc = ""]
35157    #[doc = "ID: 333"]
35158    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
35159    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
35160    #[doc = ""]
35161    #[doc = "ID: 332"]
35162    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
35163    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
35164    #[doc = ""]
35165    #[doc = "ID: 385"]
35166    TUNNEL(TUNNEL_DATA),
35167    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
35168    #[doc = ""]
35169    #[doc = "ID: 311"]
35170    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
35171    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
35172    #[doc = ""]
35173    #[doc = "ID: 310"]
35174    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
35175    #[doc = "The global position resulting from GPS and sensor fusion."]
35176    #[doc = ""]
35177    #[doc = "ID: 340"]
35178    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
35179    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
35180    #[doc = ""]
35181    #[doc = "ID: 248"]
35182    V2_EXTENSION(V2_EXTENSION_DATA),
35183    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
35184    #[doc = ""]
35185    #[doc = "ID: 74"]
35186    VFR_HUD(VFR_HUD_DATA),
35187    #[doc = "Vibration levels and accelerometer clipping."]
35188    #[doc = ""]
35189    #[doc = "ID: 241"]
35190    VIBRATION(VIBRATION_DATA),
35191    #[doc = "Global position estimate from a Vicon motion system source."]
35192    #[doc = ""]
35193    #[doc = "ID: 104"]
35194    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
35195    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
35196    #[doc = ""]
35197    #[doc = "ID: 269"]
35198    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
35199    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
35200    #[doc = ""]
35201    #[doc = "ID: 270"]
35202    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
35203    #[doc = "Local position/attitude estimate from a vision source."]
35204    #[doc = ""]
35205    #[doc = "ID: 102"]
35206    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
35207    #[doc = "Speed estimate from a vision source."]
35208    #[doc = ""]
35209    #[doc = "ID: 103"]
35210    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
35211    #[doc = "Cumulative distance traveled for each reported wheel."]
35212    #[doc = ""]
35213    #[doc = "ID: 9000"]
35214    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
35215    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
35216    #[doc = ""]
35217    #[doc = "ID: 299"]
35218    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
35219    #[doc = "Winch status."]
35220    #[doc = ""]
35221    #[doc = "ID: 9005"]
35222    WINCH_STATUS(WINCH_STATUS_DATA),
35223    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
35224    #[doc = ""]
35225    #[doc = "ID: 231"]
35226    WIND_COV(WIND_COV_DATA),
35227}
35228impl MavMessage {
35229    pub const fn all_ids() -> &'static [u32] {
35230        &[
35231            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
35232            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
35233            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
35234            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
35235            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
35236            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
35237            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
35238            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
35239            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
35240            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
35241            148u32, 149u32, 162u32, 192u32, 223u32, 224u32, 225u32, 230u32, 231u32, 232u32, 233u32,
35242            234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32,
35243            250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32,
35244            262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32,
35245            276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32,
35246            290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32,
35247            324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32,
35248            360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32,
35249            390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32,
35250            436u32, 437u32, 440u32, 8002u32, 8003u32, 8004u32, 8005u32, 8006u32, 8007u32, 8008u32,
35251            8009u32, 8010u32, 8011u32, 8012u32, 8013u32, 8014u32, 8015u32, 8016u32, 9000u32,
35252            9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32, 12915u32,
35253            12918u32, 12919u32, 12920u32,
35254        ]
35255    }
35256}
35257impl Message for MavMessage {
35258    fn parse(
35259        version: MavlinkVersion,
35260        id: u32,
35261        payload: &[u8],
35262    ) -> Result<Self, ::mavlink_core::error::ParserError> {
35263        match id {
35264            ACTUATOR_CONTROL_TARGET_DATA::ID => {
35265                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
35266                    .map(Self::ACTUATOR_CONTROL_TARGET)
35267            }
35268            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
35269                .map(Self::ACTUATOR_OUTPUT_STATUS),
35270            ADSB_VEHICLE_DATA::ID => {
35271                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
35272            }
35273            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
35274            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
35275            ASLCTRL_DATA_DATA::ID => {
35276                ASLCTRL_DATA_DATA::deser(version, payload).map(Self::ASLCTRL_DATA)
35277            }
35278            ASLCTRL_DEBUG_DATA::ID => {
35279                ASLCTRL_DEBUG_DATA::deser(version, payload).map(Self::ASLCTRL_DEBUG)
35280            }
35281            ASLUAV_STATUS_DATA::ID => {
35282                ASLUAV_STATUS_DATA::deser(version, payload).map(Self::ASLUAV_STATUS)
35283            }
35284            ASL_OBCTRL_DATA::ID => ASL_OBCTRL_DATA::deser(version, payload).map(Self::ASL_OBCTRL),
35285            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
35286            ATTITUDE_QUATERNION_DATA::ID => {
35287                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
35288            }
35289            ATTITUDE_QUATERNION_COV_DATA::ID => {
35290                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
35291                    .map(Self::ATTITUDE_QUATERNION_COV)
35292            }
35293            ATTITUDE_TARGET_DATA::ID => {
35294                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
35295            }
35296            ATT_POS_MOCAP_DATA::ID => {
35297                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
35298            }
35299            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
35300            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35301                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
35302                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
35303            }
35304            AUTOPILOT_VERSION_DATA::ID => {
35305                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
35306            }
35307            AVAILABLE_MODES_DATA::ID => {
35308                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
35309            }
35310            AVAILABLE_MODES_MONITOR_DATA::ID => {
35311                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
35312                    .map(Self::AVAILABLE_MODES_MONITOR)
35313            }
35314            BATTERY_INFO_DATA::ID => {
35315                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
35316            }
35317            BATTERY_STATUS_DATA::ID => {
35318                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
35319            }
35320            BUTTON_CHANGE_DATA::ID => {
35321                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
35322            }
35323            CAMERA_CAPTURE_STATUS_DATA::ID => {
35324                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
35325            }
35326            CAMERA_FOV_STATUS_DATA::ID => {
35327                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
35328            }
35329            CAMERA_IMAGE_CAPTURED_DATA::ID => {
35330                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
35331            }
35332            CAMERA_INFORMATION_DATA::ID => {
35333                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
35334            }
35335            CAMERA_SETTINGS_DATA::ID => {
35336                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
35337            }
35338            CAMERA_THERMAL_RANGE_DATA::ID => {
35339                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
35340            }
35341            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
35342                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
35343                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
35344            }
35345            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
35346                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
35347                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
35348            }
35349            CAMERA_TRIGGER_DATA::ID => {
35350                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
35351            }
35352            CANFD_FRAME_DATA::ID => {
35353                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
35354            }
35355            CAN_FILTER_MODIFY_DATA::ID => {
35356                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
35357            }
35358            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
35359            CELLULAR_CONFIG_DATA::ID => {
35360                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
35361            }
35362            CELLULAR_STATUS_DATA::ID => {
35363                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
35364            }
35365            CHANGE_OPERATOR_CONTROL_DATA::ID => {
35366                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
35367                    .map(Self::CHANGE_OPERATOR_CONTROL)
35368            }
35369            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
35370                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
35371                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
35372            }
35373            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
35374            COMMAND_ACK_DATA::ID => {
35375                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
35376            }
35377            COMMAND_CANCEL_DATA::ID => {
35378                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
35379            }
35380            COMMAND_INT_DATA::ID => {
35381                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
35382            }
35383            COMMAND_INT_STAMPED_DATA::ID => {
35384                COMMAND_INT_STAMPED_DATA::deser(version, payload).map(Self::COMMAND_INT_STAMPED)
35385            }
35386            COMMAND_LONG_DATA::ID => {
35387                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
35388            }
35389            COMMAND_LONG_STAMPED_DATA::ID => {
35390                COMMAND_LONG_STAMPED_DATA::deser(version, payload).map(Self::COMMAND_LONG_STAMPED)
35391            }
35392            COMPONENT_INFORMATION_DATA::ID => {
35393                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
35394            }
35395            COMPONENT_INFORMATION_BASIC_DATA::ID => {
35396                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
35397                    .map(Self::COMPONENT_INFORMATION_BASIC)
35398            }
35399            COMPONENT_METADATA_DATA::ID => {
35400                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
35401            }
35402            CONTROL_SYSTEM_STATE_DATA::ID => {
35403                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
35404            }
35405            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
35406                .map(Self::CURRENT_EVENT_SEQUENCE),
35407            CURRENT_MODE_DATA::ID => {
35408                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
35409            }
35410            DATA_STREAM_DATA::ID => {
35411                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
35412            }
35413            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
35414                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
35415                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
35416            }
35417            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
35418            DEBUG_FLOAT_ARRAY_DATA::ID => {
35419                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
35420            }
35421            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
35422            DISTANCE_SENSOR_DATA::ID => {
35423                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
35424            }
35425            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
35426            EKF_EXT_DATA::ID => EKF_EXT_DATA::deser(version, payload).map(Self::EKF_EXT),
35427            ENCAPSULATED_DATA_DATA::ID => {
35428                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
35429            }
35430            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
35431            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
35432            ESTIMATOR_STATUS_DATA::ID => {
35433                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
35434            }
35435            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
35436            EXTENDED_SYS_STATE_DATA::ID => {
35437                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
35438            }
35439            FENCE_STATUS_DATA::ID => {
35440                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
35441            }
35442            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
35443                .map(Self::FILE_TRANSFER_PROTOCOL),
35444            FLIGHT_INFORMATION_DATA::ID => {
35445                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
35446            }
35447            FOLLOW_TARGET_DATA::ID => {
35448                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
35449            }
35450            FUEL_STATUS_DATA::ID => {
35451                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
35452            }
35453            FW_SOARING_DATA_DATA::ID => {
35454                FW_SOARING_DATA_DATA::deser(version, payload).map(Self::FW_SOARING_DATA)
35455            }
35456            GENERATOR_STATUS_DATA::ID => {
35457                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
35458            }
35459            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
35460                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
35461                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
35462            }
35463            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
35464                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
35465                    .map(Self::GIMBAL_DEVICE_INFORMATION)
35466            }
35467            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
35468                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
35469                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
35470            }
35471            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
35472                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
35473                    .map(Self::GIMBAL_MANAGER_INFORMATION)
35474            }
35475            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
35476                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
35477                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
35478            }
35479            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35480                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
35481                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
35482            }
35483            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
35484                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
35485                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
35486            }
35487            GIMBAL_MANAGER_STATUS_DATA::ID => {
35488                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
35489            }
35490            GLOBAL_POSITION_INT_DATA::ID => {
35491                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
35492            }
35493            GLOBAL_POSITION_INT_COV_DATA::ID => {
35494                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
35495                    .map(Self::GLOBAL_POSITION_INT_COV)
35496            }
35497            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35498                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
35499                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
35500            }
35501            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
35502            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
35503            GPS_GLOBAL_ORIGIN_DATA::ID => {
35504                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
35505            }
35506            GPS_INJECT_DATA_DATA::ID => {
35507                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
35508            }
35509            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
35510            GPS_RAW_INT_DATA::ID => {
35511                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
35512            }
35513            GPS_RTCM_DATA_DATA::ID => {
35514                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
35515            }
35516            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
35517            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
35518            GSM_LINK_STATUS_DATA::ID => {
35519                GSM_LINK_STATUS_DATA::deser(version, payload).map(Self::GSM_LINK_STATUS)
35520            }
35521            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
35522            HIGHRES_IMU_DATA::ID => {
35523                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
35524            }
35525            HIGH_LATENCY_DATA::ID => {
35526                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
35527            }
35528            HIGH_LATENCY2_DATA::ID => {
35529                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
35530            }
35531            HIL_ACTUATOR_CONTROLS_DATA::ID => {
35532                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
35533            }
35534            HIL_CONTROLS_DATA::ID => {
35535                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
35536            }
35537            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
35538            HIL_OPTICAL_FLOW_DATA::ID => {
35539                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
35540            }
35541            HIL_RC_INPUTS_RAW_DATA::ID => {
35542                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
35543            }
35544            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
35545            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
35546            HIL_STATE_QUATERNION_DATA::ID => {
35547                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
35548            }
35549            HOME_POSITION_DATA::ID => {
35550                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
35551            }
35552            HYGROMETER_SENSOR_DATA::ID => {
35553                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
35554            }
35555            ILLUMINATOR_STATUS_DATA::ID => {
35556                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
35557            }
35558            ISBD_LINK_STATUS_DATA::ID => {
35559                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
35560            }
35561            LANDING_TARGET_DATA::ID => {
35562                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
35563            }
35564            LINK_NODE_STATUS_DATA::ID => {
35565                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
35566            }
35567            LOCAL_POSITION_NED_DATA::ID => {
35568                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
35569            }
35570            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
35571                .map(Self::LOCAL_POSITION_NED_COV),
35572            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35573                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
35574                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
35575            }
35576            LOGGING_ACK_DATA::ID => {
35577                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
35578            }
35579            LOGGING_DATA_DATA::ID => {
35580                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
35581            }
35582            LOGGING_DATA_ACKED_DATA::ID => {
35583                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
35584            }
35585            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
35586            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
35587            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
35588            LOG_REQUEST_DATA_DATA::ID => {
35589                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
35590            }
35591            LOG_REQUEST_END_DATA::ID => {
35592                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
35593            }
35594            LOG_REQUEST_LIST_DATA::ID => {
35595                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
35596            }
35597            MAG_CAL_REPORT_DATA::ID => {
35598                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
35599            }
35600            MANUAL_CONTROL_DATA::ID => {
35601                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
35602            }
35603            MANUAL_SETPOINT_DATA::ID => {
35604                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
35605            }
35606            MEMORY_VECT_DATA::ID => {
35607                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
35608            }
35609            MESSAGE_INTERVAL_DATA::ID => {
35610                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
35611            }
35612            MISSION_ACK_DATA::ID => {
35613                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
35614            }
35615            MISSION_CLEAR_ALL_DATA::ID => {
35616                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
35617            }
35618            MISSION_COUNT_DATA::ID => {
35619                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
35620            }
35621            MISSION_CURRENT_DATA::ID => {
35622                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
35623            }
35624            MISSION_ITEM_DATA::ID => {
35625                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
35626            }
35627            MISSION_ITEM_INT_DATA::ID => {
35628                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
35629            }
35630            MISSION_ITEM_REACHED_DATA::ID => {
35631                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
35632            }
35633            MISSION_REQUEST_DATA::ID => {
35634                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
35635            }
35636            MISSION_REQUEST_INT_DATA::ID => {
35637                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
35638            }
35639            MISSION_REQUEST_LIST_DATA::ID => {
35640                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
35641            }
35642            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
35643                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
35644                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
35645            }
35646            MISSION_SET_CURRENT_DATA::ID => {
35647                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
35648            }
35649            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
35650                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
35651                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
35652            }
35653            MOUNT_ORIENTATION_DATA::ID => {
35654                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
35655            }
35656            NAMED_VALUE_FLOAT_DATA::ID => {
35657                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
35658            }
35659            NAMED_VALUE_INT_DATA::ID => {
35660                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
35661            }
35662            NAV_CONTROLLER_OUTPUT_DATA::ID => {
35663                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
35664            }
35665            OBSTACLE_DISTANCE_DATA::ID => {
35666                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
35667            }
35668            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
35669            ONBOARD_COMPUTER_STATUS_DATA::ID => {
35670                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
35671                    .map(Self::ONBOARD_COMPUTER_STATUS)
35672            }
35673            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
35674                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
35675                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
35676            }
35677            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
35678                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
35679                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
35680            }
35681            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
35682                .map(Self::OPEN_DRONE_ID_BASIC_ID),
35683            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
35684                .map(Self::OPEN_DRONE_ID_LOCATION),
35685            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
35686                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
35687                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
35688            }
35689            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
35690                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
35691                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
35692            }
35693            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
35694                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
35695            }
35696            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
35697                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
35698            }
35699            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
35700                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
35701                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
35702            }
35703            OPTICAL_FLOW_DATA::ID => {
35704                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
35705            }
35706            OPTICAL_FLOW_RAD_DATA::ID => {
35707                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
35708            }
35709            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
35710                .map(Self::ORBIT_EXECUTION_STATUS),
35711            PARAM_EXT_ACK_DATA::ID => {
35712                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
35713            }
35714            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
35715                .map(Self::PARAM_EXT_REQUEST_LIST),
35716            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
35717                .map(Self::PARAM_EXT_REQUEST_READ),
35718            PARAM_EXT_SET_DATA::ID => {
35719                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
35720            }
35721            PARAM_EXT_VALUE_DATA::ID => {
35722                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
35723            }
35724            PARAM_MAP_RC_DATA::ID => {
35725                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
35726            }
35727            PARAM_REQUEST_LIST_DATA::ID => {
35728                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
35729            }
35730            PARAM_REQUEST_READ_DATA::ID => {
35731                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
35732            }
35733            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
35734            PARAM_VALUE_DATA::ID => {
35735                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
35736            }
35737            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
35738            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
35739            PLAY_TUNE_V2_DATA::ID => {
35740                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
35741            }
35742            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35743                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
35744                    .map(Self::POSITION_TARGET_GLOBAL_INT)
35745            }
35746            POSITION_TARGET_LOCAL_NED_DATA::ID => {
35747                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
35748                    .map(Self::POSITION_TARGET_LOCAL_NED)
35749            }
35750            POWER_STATUS_DATA::ID => {
35751                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
35752            }
35753            PROTOCOL_VERSION_DATA::ID => {
35754                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
35755            }
35756            RADIO_STATUS_DATA::ID => {
35757                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
35758            }
35759            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
35760            RAW_PRESSURE_DATA::ID => {
35761                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
35762            }
35763            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
35764            RC_CHANNELS_DATA::ID => {
35765                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
35766            }
35767            RC_CHANNELS_OVERRIDE_DATA::ID => {
35768                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
35769            }
35770            RC_CHANNELS_RAW_DATA::ID => {
35771                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
35772            }
35773            RC_CHANNELS_SCALED_DATA::ID => {
35774                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
35775            }
35776            REQUEST_DATA_STREAM_DATA::ID => {
35777                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
35778            }
35779            REQUEST_EVENT_DATA::ID => {
35780                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
35781            }
35782            RESOURCE_REQUEST_DATA::ID => {
35783                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
35784            }
35785            RESPONSE_EVENT_ERROR_DATA::ID => {
35786                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
35787            }
35788            SAFETY_ALLOWED_AREA_DATA::ID => {
35789                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
35790            }
35791            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
35792                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
35793                    .map(Self::SAFETY_SET_ALLOWED_AREA)
35794            }
35795            SATCOM_LINK_STATUS_DATA::ID => {
35796                SATCOM_LINK_STATUS_DATA::deser(version, payload).map(Self::SATCOM_LINK_STATUS)
35797            }
35798            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
35799            SCALED_IMU2_DATA::ID => {
35800                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
35801            }
35802            SCALED_IMU3_DATA::ID => {
35803                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
35804            }
35805            SCALED_PRESSURE_DATA::ID => {
35806                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
35807            }
35808            SCALED_PRESSURE2_DATA::ID => {
35809                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
35810            }
35811            SCALED_PRESSURE3_DATA::ID => {
35812                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
35813            }
35814            SENSORPOD_STATUS_DATA::ID => {
35815                SENSORPOD_STATUS_DATA::deser(version, payload).map(Self::SENSORPOD_STATUS)
35816            }
35817            SENSOR_AIRFLOW_ANGLES_DATA::ID => {
35818                SENSOR_AIRFLOW_ANGLES_DATA::deser(version, payload).map(Self::SENSOR_AIRFLOW_ANGLES)
35819            }
35820            SENS_ATMOS_DATA::ID => SENS_ATMOS_DATA::deser(version, payload).map(Self::SENS_ATMOS),
35821            SENS_BATMON_DATA::ID => {
35822                SENS_BATMON_DATA::deser(version, payload).map(Self::SENS_BATMON)
35823            }
35824            SENS_MPPT_DATA::ID => SENS_MPPT_DATA::deser(version, payload).map(Self::SENS_MPPT),
35825            SENS_POWER_DATA::ID => SENS_POWER_DATA::deser(version, payload).map(Self::SENS_POWER),
35826            SENS_POWER_BOARD_DATA::ID => {
35827                SENS_POWER_BOARD_DATA::deser(version, payload).map(Self::SENS_POWER_BOARD)
35828            }
35829            SERIAL_CONTROL_DATA::ID => {
35830                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
35831            }
35832            SERVO_OUTPUT_RAW_DATA::ID => {
35833                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
35834            }
35835            SETUP_SIGNING_DATA::ID => {
35836                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
35837            }
35838            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
35839                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
35840                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
35841            }
35842            SET_ATTITUDE_TARGET_DATA::ID => {
35843                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
35844            }
35845            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
35846                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
35847            }
35848            SET_HOME_POSITION_DATA::ID => {
35849                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
35850            }
35851            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
35852            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35853                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
35854                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
35855            }
35856            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
35857                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
35858                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
35859            }
35860            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
35861            SMART_BATTERY_INFO_DATA::ID => {
35862                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
35863            }
35864            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
35865            STORAGE_INFORMATION_DATA::ID => {
35866                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
35867            }
35868            SUPPORTED_TUNES_DATA::ID => {
35869                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
35870            }
35871            SYSTEM_TIME_DATA::ID => {
35872                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
35873            }
35874            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
35875            TERRAIN_CHECK_DATA::ID => {
35876                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
35877            }
35878            TERRAIN_DATA_DATA::ID => {
35879                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
35880            }
35881            TERRAIN_REPORT_DATA::ID => {
35882                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
35883            }
35884            TERRAIN_REQUEST_DATA::ID => {
35885                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
35886            }
35887            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
35888            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
35889                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
35890                    .map(Self::TIME_ESTIMATE_TO_TARGET)
35891            }
35892            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35893                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
35894                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
35895            }
35896            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35897                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
35898                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
35899            }
35900            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
35901            UAVCAN_NODE_INFO_DATA::ID => {
35902                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
35903            }
35904            UAVCAN_NODE_STATUS_DATA::ID => {
35905                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
35906            }
35907            UTM_GLOBAL_POSITION_DATA::ID => {
35908                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
35909            }
35910            V2_EXTENSION_DATA::ID => {
35911                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
35912            }
35913            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
35914            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
35915            VICON_POSITION_ESTIMATE_DATA::ID => {
35916                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
35917                    .map(Self::VICON_POSITION_ESTIMATE)
35918            }
35919            VIDEO_STREAM_INFORMATION_DATA::ID => {
35920                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
35921                    .map(Self::VIDEO_STREAM_INFORMATION)
35922            }
35923            VIDEO_STREAM_STATUS_DATA::ID => {
35924                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
35925            }
35926            VISION_POSITION_ESTIMATE_DATA::ID => {
35927                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
35928                    .map(Self::VISION_POSITION_ESTIMATE)
35929            }
35930            VISION_SPEED_ESTIMATE_DATA::ID => {
35931                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
35932            }
35933            WHEEL_DISTANCE_DATA::ID => {
35934                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
35935            }
35936            WIFI_CONFIG_AP_DATA::ID => {
35937                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
35938            }
35939            WINCH_STATUS_DATA::ID => {
35940                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
35941            }
35942            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
35943            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
35944        }
35945    }
35946    fn message_name(&self) -> &'static str {
35947        match self {
35948            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
35949            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
35950            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
35951            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
35952            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
35953            Self::ASLCTRL_DATA(..) => ASLCTRL_DATA_DATA::NAME,
35954            Self::ASLCTRL_DEBUG(..) => ASLCTRL_DEBUG_DATA::NAME,
35955            Self::ASLUAV_STATUS(..) => ASLUAV_STATUS_DATA::NAME,
35956            Self::ASL_OBCTRL(..) => ASL_OBCTRL_DATA::NAME,
35957            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
35958            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
35959            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
35960            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
35961            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
35962            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
35963            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
35964                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
35965            }
35966            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
35967            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
35968            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
35969            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
35970            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
35971            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
35972            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
35973            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
35974            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
35975            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
35976            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
35977            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
35978            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
35979            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
35980            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
35981            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
35982            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
35983            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
35984            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
35985            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
35986            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
35987            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
35988            Self::COLLISION(..) => COLLISION_DATA::NAME,
35989            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
35990            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
35991            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
35992            Self::COMMAND_INT_STAMPED(..) => COMMAND_INT_STAMPED_DATA::NAME,
35993            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
35994            Self::COMMAND_LONG_STAMPED(..) => COMMAND_LONG_STAMPED_DATA::NAME,
35995            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
35996            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
35997            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
35998            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
35999            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
36000            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
36001            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
36002            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
36003            Self::DEBUG(..) => DEBUG_DATA::NAME,
36004            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
36005            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
36006            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
36007            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
36008            Self::EKF_EXT(..) => EKF_EXT_DATA::NAME,
36009            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
36010            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
36011            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
36012            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
36013            Self::EVENT(..) => EVENT_DATA::NAME,
36014            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
36015            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
36016            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
36017            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
36018            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
36019            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
36020            Self::FW_SOARING_DATA(..) => FW_SOARING_DATA_DATA::NAME,
36021            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
36022            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
36023            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
36024            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
36025            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
36026            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
36027            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
36028                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
36029            }
36030            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
36031            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
36032            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
36033            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
36034            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
36035            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
36036            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
36037            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
36038            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
36039            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
36040            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
36041            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
36042            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
36043            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
36044            Self::GSM_LINK_STATUS(..) => GSM_LINK_STATUS_DATA::NAME,
36045            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
36046            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
36047            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
36048            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
36049            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
36050            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
36051            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
36052            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
36053            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
36054            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
36055            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
36056            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
36057            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
36058            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
36059            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
36060            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
36061            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
36062            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
36063            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
36064            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
36065            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
36066                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
36067            }
36068            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
36069            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
36070            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
36071            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
36072            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
36073            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
36074            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
36075            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
36076            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
36077            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
36078            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
36079            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
36080            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
36081            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
36082            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
36083            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
36084            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
36085            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
36086            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
36087            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
36088            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
36089            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
36090            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
36091            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
36092            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
36093            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
36094            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
36095            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
36096            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
36097            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
36098            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
36099            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
36100            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
36101            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
36102            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
36103            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
36104            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
36105            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
36106            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
36107            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
36108            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
36109            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
36110            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
36111            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
36112            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
36113            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
36114            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
36115            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
36116            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
36117            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
36118            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
36119            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
36120            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
36121            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
36122            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
36123            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
36124            Self::PING(..) => PING_DATA::NAME,
36125            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
36126            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
36127            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
36128            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
36129            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
36130            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
36131            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
36132            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
36133            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
36134            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
36135            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
36136            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
36137            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
36138            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
36139            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
36140            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
36141            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
36142            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
36143            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
36144            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
36145            Self::SATCOM_LINK_STATUS(..) => SATCOM_LINK_STATUS_DATA::NAME,
36146            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
36147            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
36148            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
36149            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
36150            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
36151            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
36152            Self::SENSORPOD_STATUS(..) => SENSORPOD_STATUS_DATA::NAME,
36153            Self::SENSOR_AIRFLOW_ANGLES(..) => SENSOR_AIRFLOW_ANGLES_DATA::NAME,
36154            Self::SENS_ATMOS(..) => SENS_ATMOS_DATA::NAME,
36155            Self::SENS_BATMON(..) => SENS_BATMON_DATA::NAME,
36156            Self::SENS_MPPT(..) => SENS_MPPT_DATA::NAME,
36157            Self::SENS_POWER(..) => SENS_POWER_DATA::NAME,
36158            Self::SENS_POWER_BOARD(..) => SENS_POWER_BOARD_DATA::NAME,
36159            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
36160            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
36161            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
36162            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
36163            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
36164            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
36165            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
36166            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
36167            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
36168            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
36169            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
36170            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
36171            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
36172            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
36173            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
36174            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
36175            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
36176            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
36177            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
36178            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
36179            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
36180            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
36181            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
36182            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
36183                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
36184            }
36185            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
36186                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
36187            }
36188            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
36189            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
36190            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
36191            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
36192            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
36193            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
36194            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
36195            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
36196            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
36197            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
36198            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
36199            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
36200            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
36201            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
36202            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
36203            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
36204        }
36205    }
36206    fn message_id(&self) -> u32 {
36207        match self {
36208            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
36209            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
36210            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
36211            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
36212            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
36213            Self::ASLCTRL_DATA(..) => ASLCTRL_DATA_DATA::ID,
36214            Self::ASLCTRL_DEBUG(..) => ASLCTRL_DEBUG_DATA::ID,
36215            Self::ASLUAV_STATUS(..) => ASLUAV_STATUS_DATA::ID,
36216            Self::ASL_OBCTRL(..) => ASL_OBCTRL_DATA::ID,
36217            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
36218            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
36219            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
36220            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
36221            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
36222            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
36223            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
36224                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
36225            }
36226            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
36227            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
36228            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
36229            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
36230            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
36231            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
36232            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
36233            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
36234            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
36235            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
36236            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
36237            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
36238            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
36239            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
36240            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
36241            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
36242            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
36243            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
36244            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
36245            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
36246            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
36247            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
36248            Self::COLLISION(..) => COLLISION_DATA::ID,
36249            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
36250            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
36251            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
36252            Self::COMMAND_INT_STAMPED(..) => COMMAND_INT_STAMPED_DATA::ID,
36253            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
36254            Self::COMMAND_LONG_STAMPED(..) => COMMAND_LONG_STAMPED_DATA::ID,
36255            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
36256            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
36257            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
36258            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
36259            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
36260            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
36261            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
36262            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
36263            Self::DEBUG(..) => DEBUG_DATA::ID,
36264            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
36265            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
36266            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
36267            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
36268            Self::EKF_EXT(..) => EKF_EXT_DATA::ID,
36269            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
36270            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
36271            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
36272            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
36273            Self::EVENT(..) => EVENT_DATA::ID,
36274            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
36275            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
36276            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
36277            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
36278            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
36279            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
36280            Self::FW_SOARING_DATA(..) => FW_SOARING_DATA_DATA::ID,
36281            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
36282            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
36283            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
36284            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
36285            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
36286            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
36287            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
36288                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
36289            }
36290            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
36291            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
36292            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
36293            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
36294            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
36295            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
36296            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
36297            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
36298            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
36299            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
36300            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
36301            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
36302            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
36303            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
36304            Self::GSM_LINK_STATUS(..) => GSM_LINK_STATUS_DATA::ID,
36305            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
36306            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
36307            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
36308            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
36309            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
36310            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
36311            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
36312            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
36313            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
36314            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
36315            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
36316            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
36317            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
36318            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
36319            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
36320            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
36321            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
36322            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
36323            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
36324            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
36325            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
36326                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
36327            }
36328            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
36329            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
36330            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
36331            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
36332            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
36333            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
36334            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
36335            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
36336            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
36337            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
36338            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
36339            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
36340            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
36341            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
36342            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
36343            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
36344            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
36345            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
36346            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
36347            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
36348            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
36349            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
36350            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
36351            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
36352            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
36353            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
36354            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
36355            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
36356            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
36357            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
36358            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
36359            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
36360            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
36361            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
36362            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
36363            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
36364            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
36365            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
36366            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
36367            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
36368            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
36369            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
36370            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
36371            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
36372            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
36373            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
36374            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
36375            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
36376            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
36377            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
36378            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
36379            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
36380            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
36381            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
36382            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
36383            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
36384            Self::PING(..) => PING_DATA::ID,
36385            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
36386            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
36387            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
36388            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
36389            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
36390            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
36391            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
36392            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
36393            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
36394            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
36395            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
36396            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
36397            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
36398            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
36399            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
36400            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
36401            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
36402            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
36403            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
36404            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
36405            Self::SATCOM_LINK_STATUS(..) => SATCOM_LINK_STATUS_DATA::ID,
36406            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
36407            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
36408            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
36409            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
36410            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
36411            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
36412            Self::SENSORPOD_STATUS(..) => SENSORPOD_STATUS_DATA::ID,
36413            Self::SENSOR_AIRFLOW_ANGLES(..) => SENSOR_AIRFLOW_ANGLES_DATA::ID,
36414            Self::SENS_ATMOS(..) => SENS_ATMOS_DATA::ID,
36415            Self::SENS_BATMON(..) => SENS_BATMON_DATA::ID,
36416            Self::SENS_MPPT(..) => SENS_MPPT_DATA::ID,
36417            Self::SENS_POWER(..) => SENS_POWER_DATA::ID,
36418            Self::SENS_POWER_BOARD(..) => SENS_POWER_BOARD_DATA::ID,
36419            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
36420            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
36421            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
36422            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
36423            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
36424            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
36425            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
36426            Self::SET_MODE(..) => SET_MODE_DATA::ID,
36427            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
36428            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
36429            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
36430            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
36431            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
36432            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
36433            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
36434            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
36435            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
36436            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
36437            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
36438            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
36439            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
36440            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
36441            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
36442            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
36443            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
36444                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
36445            }
36446            Self::TUNNEL(..) => TUNNEL_DATA::ID,
36447            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
36448            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
36449            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
36450            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
36451            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
36452            Self::VIBRATION(..) => VIBRATION_DATA::ID,
36453            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
36454            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
36455            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
36456            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
36457            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
36458            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
36459            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
36460            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
36461            Self::WIND_COV(..) => WIND_COV_DATA::ID,
36462        }
36463    }
36464    fn message_id_from_name(name: &str) -> Option<u32> {
36465        match name {
36466            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
36467            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
36468            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
36469            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
36470            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
36471            ASLCTRL_DATA_DATA::NAME => Some(ASLCTRL_DATA_DATA::ID),
36472            ASLCTRL_DEBUG_DATA::NAME => Some(ASLCTRL_DEBUG_DATA::ID),
36473            ASLUAV_STATUS_DATA::NAME => Some(ASLUAV_STATUS_DATA::ID),
36474            ASL_OBCTRL_DATA::NAME => Some(ASL_OBCTRL_DATA::ID),
36475            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
36476            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
36477            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
36478            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
36479            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
36480            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
36481            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
36482                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
36483            }
36484            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
36485            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
36486            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
36487            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
36488            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
36489            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
36490            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
36491            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
36492            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
36493            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
36494            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
36495            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
36496            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
36497            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
36498            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
36499            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
36500            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
36501            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
36502            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
36503            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
36504            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
36505            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
36506            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
36507            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
36508            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
36509            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
36510            COMMAND_INT_STAMPED_DATA::NAME => Some(COMMAND_INT_STAMPED_DATA::ID),
36511            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
36512            COMMAND_LONG_STAMPED_DATA::NAME => Some(COMMAND_LONG_STAMPED_DATA::ID),
36513            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
36514            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
36515            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
36516            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
36517            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
36518            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
36519            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
36520            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
36521            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
36522            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
36523            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
36524            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
36525            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
36526            EKF_EXT_DATA::NAME => Some(EKF_EXT_DATA::ID),
36527            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
36528            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
36529            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
36530            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
36531            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
36532            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
36533            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
36534            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
36535            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
36536            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
36537            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
36538            FW_SOARING_DATA_DATA::NAME => Some(FW_SOARING_DATA_DATA::ID),
36539            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
36540            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
36541                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
36542            }
36543            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
36544            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
36545            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
36546            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
36547            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
36548                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
36549            }
36550            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
36551            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
36552            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
36553            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
36554            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
36555                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
36556            }
36557            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
36558            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
36559            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
36560            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
36561            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
36562            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
36563            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
36564            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
36565            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
36566            GSM_LINK_STATUS_DATA::NAME => Some(GSM_LINK_STATUS_DATA::ID),
36567            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
36568            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
36569            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
36570            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
36571            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
36572            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
36573            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
36574            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
36575            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
36576            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
36577            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
36578            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
36579            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
36580            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
36581            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
36582            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
36583            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
36584            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
36585            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
36586            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
36587            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
36588                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
36589            }
36590            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
36591            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
36592            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
36593            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
36594            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
36595            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
36596            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
36597            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
36598            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
36599            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
36600            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
36601            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
36602            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
36603            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
36604            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
36605            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
36606            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
36607            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
36608            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
36609            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
36610            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
36611            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
36612            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
36613            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
36614            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
36615            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
36616            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
36617            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
36618            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
36619            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
36620            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
36621            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
36622            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
36623            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
36624            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
36625            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
36626            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
36627            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
36628            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
36629            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
36630            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
36631            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
36632            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
36633            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
36634            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
36635            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
36636            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
36637            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
36638            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
36639            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
36640            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
36641            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
36642            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
36643            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
36644            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
36645            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
36646            PING_DATA::NAME => Some(PING_DATA::ID),
36647            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
36648            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
36649            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
36650            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
36651            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
36652            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
36653            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
36654            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
36655            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
36656            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
36657            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
36658            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
36659            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
36660            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
36661            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
36662            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
36663            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
36664            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
36665            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
36666            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
36667            SATCOM_LINK_STATUS_DATA::NAME => Some(SATCOM_LINK_STATUS_DATA::ID),
36668            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
36669            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
36670            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
36671            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
36672            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
36673            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
36674            SENSORPOD_STATUS_DATA::NAME => Some(SENSORPOD_STATUS_DATA::ID),
36675            SENSOR_AIRFLOW_ANGLES_DATA::NAME => Some(SENSOR_AIRFLOW_ANGLES_DATA::ID),
36676            SENS_ATMOS_DATA::NAME => Some(SENS_ATMOS_DATA::ID),
36677            SENS_BATMON_DATA::NAME => Some(SENS_BATMON_DATA::ID),
36678            SENS_MPPT_DATA::NAME => Some(SENS_MPPT_DATA::ID),
36679            SENS_POWER_DATA::NAME => Some(SENS_POWER_DATA::ID),
36680            SENS_POWER_BOARD_DATA::NAME => Some(SENS_POWER_BOARD_DATA::ID),
36681            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
36682            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
36683            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
36684            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
36685            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
36686            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
36687            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
36688            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
36689            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
36690                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
36691            }
36692            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
36693                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
36694            }
36695            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
36696            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
36697            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
36698            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
36699            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
36700            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
36701            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
36702            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
36703            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
36704            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
36705            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
36706            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
36707            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
36708            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
36709                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
36710            }
36711            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
36712                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
36713            }
36714            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
36715            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
36716            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
36717            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
36718            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
36719            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
36720            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
36721            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
36722            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
36723            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
36724            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
36725            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
36726            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
36727            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
36728            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
36729            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
36730            _ => None,
36731        }
36732    }
36733    fn default_message_from_id(id: u32) -> Option<Self> {
36734        match id {
36735            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
36736                ACTUATOR_CONTROL_TARGET_DATA::default(),
36737            )),
36738            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
36739                ACTUATOR_OUTPUT_STATUS_DATA::default(),
36740            )),
36741            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
36742            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
36743            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
36744            ASLCTRL_DATA_DATA::ID => Some(Self::ASLCTRL_DATA(ASLCTRL_DATA_DATA::default())),
36745            ASLCTRL_DEBUG_DATA::ID => Some(Self::ASLCTRL_DEBUG(ASLCTRL_DEBUG_DATA::default())),
36746            ASLUAV_STATUS_DATA::ID => Some(Self::ASLUAV_STATUS(ASLUAV_STATUS_DATA::default())),
36747            ASL_OBCTRL_DATA::ID => Some(Self::ASL_OBCTRL(ASL_OBCTRL_DATA::default())),
36748            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
36749            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
36750                ATTITUDE_QUATERNION_DATA::default(),
36751            )),
36752            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
36753                ATTITUDE_QUATERNION_COV_DATA::default(),
36754            )),
36755            ATTITUDE_TARGET_DATA::ID => {
36756                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
36757            }
36758            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
36759            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
36760            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36761                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
36762                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
36763                ))
36764            }
36765            AUTOPILOT_VERSION_DATA::ID => {
36766                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
36767            }
36768            AVAILABLE_MODES_DATA::ID => {
36769                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
36770            }
36771            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
36772                AVAILABLE_MODES_MONITOR_DATA::default(),
36773            )),
36774            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
36775            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
36776            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
36777            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
36778                CAMERA_CAPTURE_STATUS_DATA::default(),
36779            )),
36780            CAMERA_FOV_STATUS_DATA::ID => {
36781                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
36782            }
36783            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
36784                CAMERA_IMAGE_CAPTURED_DATA::default(),
36785            )),
36786            CAMERA_INFORMATION_DATA::ID => {
36787                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
36788            }
36789            CAMERA_SETTINGS_DATA::ID => {
36790                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
36791            }
36792            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
36793                CAMERA_THERMAL_RANGE_DATA::default(),
36794            )),
36795            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
36796                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
36797            )),
36798            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
36799                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
36800            )),
36801            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
36802            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
36803            CAN_FILTER_MODIFY_DATA::ID => {
36804                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
36805            }
36806            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
36807            CELLULAR_CONFIG_DATA::ID => {
36808                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
36809            }
36810            CELLULAR_STATUS_DATA::ID => {
36811                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
36812            }
36813            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
36814                CHANGE_OPERATOR_CONTROL_DATA::default(),
36815            )),
36816            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
36817                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
36818            )),
36819            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
36820            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
36821            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
36822            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
36823            COMMAND_INT_STAMPED_DATA::ID => Some(Self::COMMAND_INT_STAMPED(
36824                COMMAND_INT_STAMPED_DATA::default(),
36825            )),
36826            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
36827            COMMAND_LONG_STAMPED_DATA::ID => Some(Self::COMMAND_LONG_STAMPED(
36828                COMMAND_LONG_STAMPED_DATA::default(),
36829            )),
36830            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
36831                COMPONENT_INFORMATION_DATA::default(),
36832            )),
36833            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
36834                COMPONENT_INFORMATION_BASIC_DATA::default(),
36835            )),
36836            COMPONENT_METADATA_DATA::ID => {
36837                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
36838            }
36839            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
36840                CONTROL_SYSTEM_STATE_DATA::default(),
36841            )),
36842            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
36843                CURRENT_EVENT_SEQUENCE_DATA::default(),
36844            )),
36845            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
36846            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
36847            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
36848                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
36849            )),
36850            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
36851            DEBUG_FLOAT_ARRAY_DATA::ID => {
36852                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
36853            }
36854            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
36855            DISTANCE_SENSOR_DATA::ID => {
36856                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
36857            }
36858            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
36859            EKF_EXT_DATA::ID => Some(Self::EKF_EXT(EKF_EXT_DATA::default())),
36860            ENCAPSULATED_DATA_DATA::ID => {
36861                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
36862            }
36863            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
36864            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
36865            ESTIMATOR_STATUS_DATA::ID => {
36866                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
36867            }
36868            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
36869            EXTENDED_SYS_STATE_DATA::ID => {
36870                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
36871            }
36872            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
36873            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
36874                FILE_TRANSFER_PROTOCOL_DATA::default(),
36875            )),
36876            FLIGHT_INFORMATION_DATA::ID => {
36877                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
36878            }
36879            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
36880            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
36881            FW_SOARING_DATA_DATA::ID => {
36882                Some(Self::FW_SOARING_DATA(FW_SOARING_DATA_DATA::default()))
36883            }
36884            GENERATOR_STATUS_DATA::ID => {
36885                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
36886            }
36887            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
36888                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
36889            )),
36890            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
36891                GIMBAL_DEVICE_INFORMATION_DATA::default(),
36892            )),
36893            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
36894                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
36895            )),
36896            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
36897                GIMBAL_MANAGER_INFORMATION_DATA::default(),
36898            )),
36899            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
36900                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
36901            )),
36902            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36903                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36904                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
36905                ))
36906            }
36907            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36908                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
36909            )),
36910            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36911                GIMBAL_MANAGER_STATUS_DATA::default(),
36912            )),
36913            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36914                GLOBAL_POSITION_INT_DATA::default(),
36915            )),
36916            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36917                GLOBAL_POSITION_INT_COV_DATA::default(),
36918            )),
36919            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36920                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36921                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
36922                ))
36923            }
36924            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
36925            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
36926            GPS_GLOBAL_ORIGIN_DATA::ID => {
36927                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
36928            }
36929            GPS_INJECT_DATA_DATA::ID => {
36930                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
36931            }
36932            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
36933            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
36934            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
36935            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
36936            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
36937            GSM_LINK_STATUS_DATA::ID => {
36938                Some(Self::GSM_LINK_STATUS(GSM_LINK_STATUS_DATA::default()))
36939            }
36940            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
36941            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
36942            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
36943            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
36944            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36945                HIL_ACTUATOR_CONTROLS_DATA::default(),
36946            )),
36947            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
36948            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
36949            HIL_OPTICAL_FLOW_DATA::ID => {
36950                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
36951            }
36952            HIL_RC_INPUTS_RAW_DATA::ID => {
36953                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
36954            }
36955            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
36956            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
36957            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36958                HIL_STATE_QUATERNION_DATA::default(),
36959            )),
36960            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
36961            HYGROMETER_SENSOR_DATA::ID => {
36962                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
36963            }
36964            ILLUMINATOR_STATUS_DATA::ID => {
36965                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
36966            }
36967            ISBD_LINK_STATUS_DATA::ID => {
36968                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
36969            }
36970            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
36971            LINK_NODE_STATUS_DATA::ID => {
36972                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
36973            }
36974            LOCAL_POSITION_NED_DATA::ID => {
36975                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
36976            }
36977            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36978                LOCAL_POSITION_NED_COV_DATA::default(),
36979            )),
36980            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36981                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36982                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
36983                ))
36984            }
36985            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
36986            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
36987            LOGGING_DATA_ACKED_DATA::ID => {
36988                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
36989            }
36990            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
36991            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
36992            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
36993            LOG_REQUEST_DATA_DATA::ID => {
36994                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
36995            }
36996            LOG_REQUEST_END_DATA::ID => {
36997                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
36998            }
36999            LOG_REQUEST_LIST_DATA::ID => {
37000                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
37001            }
37002            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
37003            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
37004            MANUAL_SETPOINT_DATA::ID => {
37005                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
37006            }
37007            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
37008            MESSAGE_INTERVAL_DATA::ID => {
37009                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
37010            }
37011            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
37012            MISSION_CLEAR_ALL_DATA::ID => {
37013                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
37014            }
37015            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
37016            MISSION_CURRENT_DATA::ID => {
37017                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
37018            }
37019            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
37020            MISSION_ITEM_INT_DATA::ID => {
37021                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
37022            }
37023            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
37024                MISSION_ITEM_REACHED_DATA::default(),
37025            )),
37026            MISSION_REQUEST_DATA::ID => {
37027                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
37028            }
37029            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
37030                MISSION_REQUEST_INT_DATA::default(),
37031            )),
37032            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
37033                MISSION_REQUEST_LIST_DATA::default(),
37034            )),
37035            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
37036                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
37037            )),
37038            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
37039                MISSION_SET_CURRENT_DATA::default(),
37040            )),
37041            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
37042                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
37043            )),
37044            MOUNT_ORIENTATION_DATA::ID => {
37045                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
37046            }
37047            NAMED_VALUE_FLOAT_DATA::ID => {
37048                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
37049            }
37050            NAMED_VALUE_INT_DATA::ID => {
37051                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
37052            }
37053            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
37054                NAV_CONTROLLER_OUTPUT_DATA::default(),
37055            )),
37056            OBSTACLE_DISTANCE_DATA::ID => {
37057                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
37058            }
37059            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
37060            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
37061                ONBOARD_COMPUTER_STATUS_DATA::default(),
37062            )),
37063            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
37064                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
37065            )),
37066            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
37067                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
37068            )),
37069            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
37070                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
37071            )),
37072            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
37073                OPEN_DRONE_ID_LOCATION_DATA::default(),
37074            )),
37075            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
37076                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
37077            )),
37078            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
37079                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
37080            )),
37081            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
37082                OPEN_DRONE_ID_SELF_ID_DATA::default(),
37083            )),
37084            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
37085                OPEN_DRONE_ID_SYSTEM_DATA::default(),
37086            )),
37087            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
37088                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
37089            )),
37090            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
37091            OPTICAL_FLOW_RAD_DATA::ID => {
37092                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
37093            }
37094            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
37095                ORBIT_EXECUTION_STATUS_DATA::default(),
37096            )),
37097            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
37098            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
37099                PARAM_EXT_REQUEST_LIST_DATA::default(),
37100            )),
37101            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
37102                PARAM_EXT_REQUEST_READ_DATA::default(),
37103            )),
37104            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
37105            PARAM_EXT_VALUE_DATA::ID => {
37106                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
37107            }
37108            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
37109            PARAM_REQUEST_LIST_DATA::ID => {
37110                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
37111            }
37112            PARAM_REQUEST_READ_DATA::ID => {
37113                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
37114            }
37115            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
37116            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
37117            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
37118            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
37119            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
37120            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
37121                POSITION_TARGET_GLOBAL_INT_DATA::default(),
37122            )),
37123            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
37124                POSITION_TARGET_LOCAL_NED_DATA::default(),
37125            )),
37126            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
37127            PROTOCOL_VERSION_DATA::ID => {
37128                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
37129            }
37130            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
37131            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
37132            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
37133            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
37134            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
37135            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
37136                RC_CHANNELS_OVERRIDE_DATA::default(),
37137            )),
37138            RC_CHANNELS_RAW_DATA::ID => {
37139                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
37140            }
37141            RC_CHANNELS_SCALED_DATA::ID => {
37142                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
37143            }
37144            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
37145                REQUEST_DATA_STREAM_DATA::default(),
37146            )),
37147            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
37148            RESOURCE_REQUEST_DATA::ID => {
37149                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
37150            }
37151            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
37152                RESPONSE_EVENT_ERROR_DATA::default(),
37153            )),
37154            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
37155                SAFETY_ALLOWED_AREA_DATA::default(),
37156            )),
37157            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
37158                SAFETY_SET_ALLOWED_AREA_DATA::default(),
37159            )),
37160            SATCOM_LINK_STATUS_DATA::ID => {
37161                Some(Self::SATCOM_LINK_STATUS(SATCOM_LINK_STATUS_DATA::default()))
37162            }
37163            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
37164            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
37165            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
37166            SCALED_PRESSURE_DATA::ID => {
37167                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
37168            }
37169            SCALED_PRESSURE2_DATA::ID => {
37170                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
37171            }
37172            SCALED_PRESSURE3_DATA::ID => {
37173                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
37174            }
37175            SENSORPOD_STATUS_DATA::ID => {
37176                Some(Self::SENSORPOD_STATUS(SENSORPOD_STATUS_DATA::default()))
37177            }
37178            SENSOR_AIRFLOW_ANGLES_DATA::ID => Some(Self::SENSOR_AIRFLOW_ANGLES(
37179                SENSOR_AIRFLOW_ANGLES_DATA::default(),
37180            )),
37181            SENS_ATMOS_DATA::ID => Some(Self::SENS_ATMOS(SENS_ATMOS_DATA::default())),
37182            SENS_BATMON_DATA::ID => Some(Self::SENS_BATMON(SENS_BATMON_DATA::default())),
37183            SENS_MPPT_DATA::ID => Some(Self::SENS_MPPT(SENS_MPPT_DATA::default())),
37184            SENS_POWER_DATA::ID => Some(Self::SENS_POWER(SENS_POWER_DATA::default())),
37185            SENS_POWER_BOARD_DATA::ID => {
37186                Some(Self::SENS_POWER_BOARD(SENS_POWER_BOARD_DATA::default()))
37187            }
37188            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
37189            SERVO_OUTPUT_RAW_DATA::ID => {
37190                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
37191            }
37192            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
37193            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
37194                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
37195            )),
37196            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
37197                SET_ATTITUDE_TARGET_DATA::default(),
37198            )),
37199            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
37200                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
37201            )),
37202            SET_HOME_POSITION_DATA::ID => {
37203                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
37204            }
37205            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
37206            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
37207                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
37208            )),
37209            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
37210                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
37211            )),
37212            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
37213            SMART_BATTERY_INFO_DATA::ID => {
37214                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
37215            }
37216            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
37217            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
37218                STORAGE_INFORMATION_DATA::default(),
37219            )),
37220            SUPPORTED_TUNES_DATA::ID => {
37221                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
37222            }
37223            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
37224            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
37225            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
37226            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
37227            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
37228            TERRAIN_REQUEST_DATA::ID => {
37229                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
37230            }
37231            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
37232            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
37233                TIME_ESTIMATE_TO_TARGET_DATA::default(),
37234            )),
37235            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37236                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
37237                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
37238                ))
37239            }
37240            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37241                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
37242                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
37243                ))
37244            }
37245            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
37246            UAVCAN_NODE_INFO_DATA::ID => {
37247                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
37248            }
37249            UAVCAN_NODE_STATUS_DATA::ID => {
37250                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
37251            }
37252            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
37253                UTM_GLOBAL_POSITION_DATA::default(),
37254            )),
37255            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
37256            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
37257            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
37258            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
37259                VICON_POSITION_ESTIMATE_DATA::default(),
37260            )),
37261            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
37262                VIDEO_STREAM_INFORMATION_DATA::default(),
37263            )),
37264            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
37265                VIDEO_STREAM_STATUS_DATA::default(),
37266            )),
37267            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
37268                VISION_POSITION_ESTIMATE_DATA::default(),
37269            )),
37270            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
37271                VISION_SPEED_ESTIMATE_DATA::default(),
37272            )),
37273            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
37274            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
37275            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
37276            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
37277            _ => None,
37278        }
37279    }
37280    #[cfg(feature = "arbitrary")]
37281    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
37282        match id {
37283            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
37284                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
37285            )),
37286            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
37287                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
37288            )),
37289            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
37290            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
37291            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
37292            ASLCTRL_DATA_DATA::ID => Some(Self::ASLCTRL_DATA(ASLCTRL_DATA_DATA::random(rng))),
37293            ASLCTRL_DEBUG_DATA::ID => Some(Self::ASLCTRL_DEBUG(ASLCTRL_DEBUG_DATA::random(rng))),
37294            ASLUAV_STATUS_DATA::ID => Some(Self::ASLUAV_STATUS(ASLUAV_STATUS_DATA::random(rng))),
37295            ASL_OBCTRL_DATA::ID => Some(Self::ASL_OBCTRL(ASL_OBCTRL_DATA::random(rng))),
37296            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
37297            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
37298                ATTITUDE_QUATERNION_DATA::random(rng),
37299            )),
37300            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
37301                ATTITUDE_QUATERNION_COV_DATA::random(rng),
37302            )),
37303            ATTITUDE_TARGET_DATA::ID => {
37304                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
37305            }
37306            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
37307            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
37308            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
37309                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
37310                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
37311                ))
37312            }
37313            AUTOPILOT_VERSION_DATA::ID => {
37314                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
37315            }
37316            AVAILABLE_MODES_DATA::ID => {
37317                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
37318            }
37319            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
37320                AVAILABLE_MODES_MONITOR_DATA::random(rng),
37321            )),
37322            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
37323            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
37324            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
37325            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
37326                CAMERA_CAPTURE_STATUS_DATA::random(rng),
37327            )),
37328            CAMERA_FOV_STATUS_DATA::ID => {
37329                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
37330            }
37331            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
37332                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
37333            )),
37334            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
37335                CAMERA_INFORMATION_DATA::random(rng),
37336            )),
37337            CAMERA_SETTINGS_DATA::ID => {
37338                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
37339            }
37340            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
37341                CAMERA_THERMAL_RANGE_DATA::random(rng),
37342            )),
37343            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
37344                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
37345            )),
37346            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
37347                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
37348            )),
37349            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
37350            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
37351            CAN_FILTER_MODIFY_DATA::ID => {
37352                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
37353            }
37354            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
37355            CELLULAR_CONFIG_DATA::ID => {
37356                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
37357            }
37358            CELLULAR_STATUS_DATA::ID => {
37359                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
37360            }
37361            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
37362                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
37363            )),
37364            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
37365                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
37366            )),
37367            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
37368            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
37369            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
37370            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
37371            COMMAND_INT_STAMPED_DATA::ID => Some(Self::COMMAND_INT_STAMPED(
37372                COMMAND_INT_STAMPED_DATA::random(rng),
37373            )),
37374            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
37375            COMMAND_LONG_STAMPED_DATA::ID => Some(Self::COMMAND_LONG_STAMPED(
37376                COMMAND_LONG_STAMPED_DATA::random(rng),
37377            )),
37378            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
37379                COMPONENT_INFORMATION_DATA::random(rng),
37380            )),
37381            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
37382                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
37383            )),
37384            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
37385                COMPONENT_METADATA_DATA::random(rng),
37386            )),
37387            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
37388                CONTROL_SYSTEM_STATE_DATA::random(rng),
37389            )),
37390            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
37391                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
37392            )),
37393            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
37394            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
37395            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
37396                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
37397            )),
37398            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
37399            DEBUG_FLOAT_ARRAY_DATA::ID => {
37400                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
37401            }
37402            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
37403            DISTANCE_SENSOR_DATA::ID => {
37404                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
37405            }
37406            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
37407            EKF_EXT_DATA::ID => Some(Self::EKF_EXT(EKF_EXT_DATA::random(rng))),
37408            ENCAPSULATED_DATA_DATA::ID => {
37409                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
37410            }
37411            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
37412            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
37413            ESTIMATOR_STATUS_DATA::ID => {
37414                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
37415            }
37416            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
37417            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
37418                EXTENDED_SYS_STATE_DATA::random(rng),
37419            )),
37420            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
37421            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
37422                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
37423            )),
37424            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
37425                FLIGHT_INFORMATION_DATA::random(rng),
37426            )),
37427            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
37428            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
37429            FW_SOARING_DATA_DATA::ID => {
37430                Some(Self::FW_SOARING_DATA(FW_SOARING_DATA_DATA::random(rng)))
37431            }
37432            GENERATOR_STATUS_DATA::ID => {
37433                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
37434            }
37435            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
37436                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
37437            )),
37438            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
37439                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
37440            )),
37441            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
37442                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
37443            )),
37444            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
37445                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
37446            )),
37447            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
37448                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
37449            )),
37450            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37451                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
37452                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
37453                ))
37454            }
37455            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
37456                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
37457            )),
37458            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
37459                GIMBAL_MANAGER_STATUS_DATA::random(rng),
37460            )),
37461            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
37462                GLOBAL_POSITION_INT_DATA::random(rng),
37463            )),
37464            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
37465                GLOBAL_POSITION_INT_COV_DATA::random(rng),
37466            )),
37467            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37468                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
37469                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
37470                ))
37471            }
37472            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
37473            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
37474            GPS_GLOBAL_ORIGIN_DATA::ID => {
37475                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
37476            }
37477            GPS_INJECT_DATA_DATA::ID => {
37478                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
37479            }
37480            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
37481            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
37482            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
37483            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
37484            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
37485            GSM_LINK_STATUS_DATA::ID => {
37486                Some(Self::GSM_LINK_STATUS(GSM_LINK_STATUS_DATA::random(rng)))
37487            }
37488            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
37489            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
37490            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
37491            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
37492            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
37493                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
37494            )),
37495            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
37496            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
37497            HIL_OPTICAL_FLOW_DATA::ID => {
37498                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
37499            }
37500            HIL_RC_INPUTS_RAW_DATA::ID => {
37501                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
37502            }
37503            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
37504            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
37505            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
37506                HIL_STATE_QUATERNION_DATA::random(rng),
37507            )),
37508            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
37509            HYGROMETER_SENSOR_DATA::ID => {
37510                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
37511            }
37512            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
37513                ILLUMINATOR_STATUS_DATA::random(rng),
37514            )),
37515            ISBD_LINK_STATUS_DATA::ID => {
37516                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
37517            }
37518            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
37519            LINK_NODE_STATUS_DATA::ID => {
37520                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
37521            }
37522            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
37523                LOCAL_POSITION_NED_DATA::random(rng),
37524            )),
37525            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
37526                LOCAL_POSITION_NED_COV_DATA::random(rng),
37527            )),
37528            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37529                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
37530                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
37531                ))
37532            }
37533            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
37534            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
37535            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
37536                LOGGING_DATA_ACKED_DATA::random(rng),
37537            )),
37538            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
37539            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
37540            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
37541            LOG_REQUEST_DATA_DATA::ID => {
37542                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
37543            }
37544            LOG_REQUEST_END_DATA::ID => {
37545                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
37546            }
37547            LOG_REQUEST_LIST_DATA::ID => {
37548                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
37549            }
37550            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
37551            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
37552            MANUAL_SETPOINT_DATA::ID => {
37553                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
37554            }
37555            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
37556            MESSAGE_INTERVAL_DATA::ID => {
37557                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
37558            }
37559            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
37560            MISSION_CLEAR_ALL_DATA::ID => {
37561                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
37562            }
37563            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
37564            MISSION_CURRENT_DATA::ID => {
37565                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
37566            }
37567            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
37568            MISSION_ITEM_INT_DATA::ID => {
37569                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
37570            }
37571            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
37572                MISSION_ITEM_REACHED_DATA::random(rng),
37573            )),
37574            MISSION_REQUEST_DATA::ID => {
37575                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
37576            }
37577            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
37578                MISSION_REQUEST_INT_DATA::random(rng),
37579            )),
37580            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
37581                MISSION_REQUEST_LIST_DATA::random(rng),
37582            )),
37583            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
37584                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
37585            )),
37586            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
37587                MISSION_SET_CURRENT_DATA::random(rng),
37588            )),
37589            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
37590                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
37591            )),
37592            MOUNT_ORIENTATION_DATA::ID => {
37593                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
37594            }
37595            NAMED_VALUE_FLOAT_DATA::ID => {
37596                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
37597            }
37598            NAMED_VALUE_INT_DATA::ID => {
37599                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
37600            }
37601            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
37602                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
37603            )),
37604            OBSTACLE_DISTANCE_DATA::ID => {
37605                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
37606            }
37607            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
37608            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
37609                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
37610            )),
37611            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
37612                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
37613            )),
37614            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
37615                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
37616            )),
37617            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
37618                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
37619            )),
37620            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
37621                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
37622            )),
37623            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
37624                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
37625            )),
37626            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
37627                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
37628            )),
37629            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
37630                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
37631            )),
37632            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
37633                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
37634            )),
37635            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
37636                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
37637            )),
37638            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
37639            OPTICAL_FLOW_RAD_DATA::ID => {
37640                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
37641            }
37642            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
37643                ORBIT_EXECUTION_STATUS_DATA::random(rng),
37644            )),
37645            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
37646            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
37647                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
37648            )),
37649            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
37650                PARAM_EXT_REQUEST_READ_DATA::random(rng),
37651            )),
37652            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
37653            PARAM_EXT_VALUE_DATA::ID => {
37654                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
37655            }
37656            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
37657            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
37658                PARAM_REQUEST_LIST_DATA::random(rng),
37659            )),
37660            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
37661                PARAM_REQUEST_READ_DATA::random(rng),
37662            )),
37663            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
37664            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
37665            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
37666            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
37667            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
37668            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
37669                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
37670            )),
37671            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
37672                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
37673            )),
37674            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
37675            PROTOCOL_VERSION_DATA::ID => {
37676                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
37677            }
37678            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
37679            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
37680            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
37681            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
37682            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
37683            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
37684                RC_CHANNELS_OVERRIDE_DATA::random(rng),
37685            )),
37686            RC_CHANNELS_RAW_DATA::ID => {
37687                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
37688            }
37689            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
37690                RC_CHANNELS_SCALED_DATA::random(rng),
37691            )),
37692            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
37693                REQUEST_DATA_STREAM_DATA::random(rng),
37694            )),
37695            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
37696            RESOURCE_REQUEST_DATA::ID => {
37697                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
37698            }
37699            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
37700                RESPONSE_EVENT_ERROR_DATA::random(rng),
37701            )),
37702            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
37703                SAFETY_ALLOWED_AREA_DATA::random(rng),
37704            )),
37705            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
37706                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
37707            )),
37708            SATCOM_LINK_STATUS_DATA::ID => Some(Self::SATCOM_LINK_STATUS(
37709                SATCOM_LINK_STATUS_DATA::random(rng),
37710            )),
37711            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
37712            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
37713            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
37714            SCALED_PRESSURE_DATA::ID => {
37715                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
37716            }
37717            SCALED_PRESSURE2_DATA::ID => {
37718                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
37719            }
37720            SCALED_PRESSURE3_DATA::ID => {
37721                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
37722            }
37723            SENSORPOD_STATUS_DATA::ID => {
37724                Some(Self::SENSORPOD_STATUS(SENSORPOD_STATUS_DATA::random(rng)))
37725            }
37726            SENSOR_AIRFLOW_ANGLES_DATA::ID => Some(Self::SENSOR_AIRFLOW_ANGLES(
37727                SENSOR_AIRFLOW_ANGLES_DATA::random(rng),
37728            )),
37729            SENS_ATMOS_DATA::ID => Some(Self::SENS_ATMOS(SENS_ATMOS_DATA::random(rng))),
37730            SENS_BATMON_DATA::ID => Some(Self::SENS_BATMON(SENS_BATMON_DATA::random(rng))),
37731            SENS_MPPT_DATA::ID => Some(Self::SENS_MPPT(SENS_MPPT_DATA::random(rng))),
37732            SENS_POWER_DATA::ID => Some(Self::SENS_POWER(SENS_POWER_DATA::random(rng))),
37733            SENS_POWER_BOARD_DATA::ID => {
37734                Some(Self::SENS_POWER_BOARD(SENS_POWER_BOARD_DATA::random(rng)))
37735            }
37736            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
37737            SERVO_OUTPUT_RAW_DATA::ID => {
37738                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
37739            }
37740            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
37741            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
37742                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
37743            )),
37744            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
37745                SET_ATTITUDE_TARGET_DATA::random(rng),
37746            )),
37747            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
37748                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
37749            )),
37750            SET_HOME_POSITION_DATA::ID => {
37751                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
37752            }
37753            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
37754            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
37755                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
37756            )),
37757            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
37758                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
37759            )),
37760            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
37761            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
37762                SMART_BATTERY_INFO_DATA::random(rng),
37763            )),
37764            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
37765            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
37766                STORAGE_INFORMATION_DATA::random(rng),
37767            )),
37768            SUPPORTED_TUNES_DATA::ID => {
37769                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
37770            }
37771            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
37772            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
37773            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
37774            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
37775            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
37776            TERRAIN_REQUEST_DATA::ID => {
37777                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
37778            }
37779            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
37780            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
37781                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
37782            )),
37783            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37784                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
37785                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
37786                ))
37787            }
37788            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37789                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
37790                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
37791                ))
37792            }
37793            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
37794            UAVCAN_NODE_INFO_DATA::ID => {
37795                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
37796            }
37797            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
37798                UAVCAN_NODE_STATUS_DATA::random(rng),
37799            )),
37800            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
37801                UTM_GLOBAL_POSITION_DATA::random(rng),
37802            )),
37803            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
37804            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
37805            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
37806            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
37807                VICON_POSITION_ESTIMATE_DATA::random(rng),
37808            )),
37809            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
37810                VIDEO_STREAM_INFORMATION_DATA::random(rng),
37811            )),
37812            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
37813                VIDEO_STREAM_STATUS_DATA::random(rng),
37814            )),
37815            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
37816                VISION_POSITION_ESTIMATE_DATA::random(rng),
37817            )),
37818            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
37819                VISION_SPEED_ESTIMATE_DATA::random(rng),
37820            )),
37821            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
37822            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
37823            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
37824            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
37825            _ => None,
37826        }
37827    }
37828    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
37829        match self {
37830            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
37831            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
37832            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
37833            Self::AIS_VESSEL(body) => body.ser(version, bytes),
37834            Self::ALTITUDE(body) => body.ser(version, bytes),
37835            Self::ASLCTRL_DATA(body) => body.ser(version, bytes),
37836            Self::ASLCTRL_DEBUG(body) => body.ser(version, bytes),
37837            Self::ASLUAV_STATUS(body) => body.ser(version, bytes),
37838            Self::ASL_OBCTRL(body) => body.ser(version, bytes),
37839            Self::ATTITUDE(body) => body.ser(version, bytes),
37840            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
37841            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
37842            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
37843            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
37844            Self::AUTH_KEY(body) => body.ser(version, bytes),
37845            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
37846            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
37847            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
37848            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
37849            Self::BATTERY_INFO(body) => body.ser(version, bytes),
37850            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
37851            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
37852            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
37853            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
37854            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
37855            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
37856            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
37857            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
37858            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
37859            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
37860            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
37861            Self::CANFD_FRAME(body) => body.ser(version, bytes),
37862            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
37863            Self::CAN_FRAME(body) => body.ser(version, bytes),
37864            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
37865            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
37866            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
37867            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
37868            Self::COLLISION(body) => body.ser(version, bytes),
37869            Self::COMMAND_ACK(body) => body.ser(version, bytes),
37870            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
37871            Self::COMMAND_INT(body) => body.ser(version, bytes),
37872            Self::COMMAND_INT_STAMPED(body) => body.ser(version, bytes),
37873            Self::COMMAND_LONG(body) => body.ser(version, bytes),
37874            Self::COMMAND_LONG_STAMPED(body) => body.ser(version, bytes),
37875            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
37876            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
37877            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
37878            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
37879            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
37880            Self::CURRENT_MODE(body) => body.ser(version, bytes),
37881            Self::DATA_STREAM(body) => body.ser(version, bytes),
37882            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
37883            Self::DEBUG(body) => body.ser(version, bytes),
37884            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
37885            Self::DEBUG_VECT(body) => body.ser(version, bytes),
37886            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
37887            Self::EFI_STATUS(body) => body.ser(version, bytes),
37888            Self::EKF_EXT(body) => body.ser(version, bytes),
37889            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
37890            Self::ESC_INFO(body) => body.ser(version, bytes),
37891            Self::ESC_STATUS(body) => body.ser(version, bytes),
37892            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
37893            Self::EVENT(body) => body.ser(version, bytes),
37894            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
37895            Self::FENCE_STATUS(body) => body.ser(version, bytes),
37896            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
37897            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
37898            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
37899            Self::FUEL_STATUS(body) => body.ser(version, bytes),
37900            Self::FW_SOARING_DATA(body) => body.ser(version, bytes),
37901            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
37902            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
37903            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
37904            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
37905            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
37906            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
37907            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
37908            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
37909            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
37910            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
37911            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
37912            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37913            Self::GPS2_RAW(body) => body.ser(version, bytes),
37914            Self::GPS2_RTK(body) => body.ser(version, bytes),
37915            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
37916            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
37917            Self::GPS_INPUT(body) => body.ser(version, bytes),
37918            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
37919            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
37920            Self::GPS_RTK(body) => body.ser(version, bytes),
37921            Self::GPS_STATUS(body) => body.ser(version, bytes),
37922            Self::GSM_LINK_STATUS(body) => body.ser(version, bytes),
37923            Self::HEARTBEAT(body) => body.ser(version, bytes),
37924            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
37925            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
37926            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
37927            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
37928            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
37929            Self::HIL_GPS(body) => body.ser(version, bytes),
37930            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
37931            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
37932            Self::HIL_SENSOR(body) => body.ser(version, bytes),
37933            Self::HIL_STATE(body) => body.ser(version, bytes),
37934            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
37935            Self::HOME_POSITION(body) => body.ser(version, bytes),
37936            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
37937            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
37938            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
37939            Self::LANDING_TARGET(body) => body.ser(version, bytes),
37940            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
37941            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
37942            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
37943            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
37944            Self::LOGGING_ACK(body) => body.ser(version, bytes),
37945            Self::LOGGING_DATA(body) => body.ser(version, bytes),
37946            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
37947            Self::LOG_DATA(body) => body.ser(version, bytes),
37948            Self::LOG_ENTRY(body) => body.ser(version, bytes),
37949            Self::LOG_ERASE(body) => body.ser(version, bytes),
37950            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
37951            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
37952            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
37953            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
37954            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
37955            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
37956            Self::MEMORY_VECT(body) => body.ser(version, bytes),
37957            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
37958            Self::MISSION_ACK(body) => body.ser(version, bytes),
37959            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
37960            Self::MISSION_COUNT(body) => body.ser(version, bytes),
37961            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
37962            Self::MISSION_ITEM(body) => body.ser(version, bytes),
37963            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
37964            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
37965            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
37966            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
37967            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
37968            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
37969            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
37970            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
37971            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
37972            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
37973            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
37974            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
37975            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
37976            Self::ODOMETRY(body) => body.ser(version, bytes),
37977            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
37978            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
37979            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
37980            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
37981            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
37982            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
37983            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
37984            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
37985            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
37986            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
37987            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
37988            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
37989            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
37990            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
37991            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
37992            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
37993            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
37994            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
37995            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
37996            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
37997            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
37998            Self::PARAM_SET(body) => body.ser(version, bytes),
37999            Self::PARAM_VALUE(body) => body.ser(version, bytes),
38000            Self::PING(body) => body.ser(version, bytes),
38001            Self::PLAY_TUNE(body) => body.ser(version, bytes),
38002            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
38003            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
38004            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
38005            Self::POWER_STATUS(body) => body.ser(version, bytes),
38006            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
38007            Self::RADIO_STATUS(body) => body.ser(version, bytes),
38008            Self::RAW_IMU(body) => body.ser(version, bytes),
38009            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
38010            Self::RAW_RPM(body) => body.ser(version, bytes),
38011            Self::RC_CHANNELS(body) => body.ser(version, bytes),
38012            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
38013            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
38014            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
38015            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
38016            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
38017            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
38018            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
38019            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
38020            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
38021            Self::SATCOM_LINK_STATUS(body) => body.ser(version, bytes),
38022            Self::SCALED_IMU(body) => body.ser(version, bytes),
38023            Self::SCALED_IMU2(body) => body.ser(version, bytes),
38024            Self::SCALED_IMU3(body) => body.ser(version, bytes),
38025            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
38026            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
38027            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
38028            Self::SENSORPOD_STATUS(body) => body.ser(version, bytes),
38029            Self::SENSOR_AIRFLOW_ANGLES(body) => body.ser(version, bytes),
38030            Self::SENS_ATMOS(body) => body.ser(version, bytes),
38031            Self::SENS_BATMON(body) => body.ser(version, bytes),
38032            Self::SENS_MPPT(body) => body.ser(version, bytes),
38033            Self::SENS_POWER(body) => body.ser(version, bytes),
38034            Self::SENS_POWER_BOARD(body) => body.ser(version, bytes),
38035            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
38036            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
38037            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
38038            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
38039            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
38040            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
38041            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
38042            Self::SET_MODE(body) => body.ser(version, bytes),
38043            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
38044            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
38045            Self::SIM_STATE(body) => body.ser(version, bytes),
38046            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
38047            Self::STATUSTEXT(body) => body.ser(version, bytes),
38048            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
38049            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
38050            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
38051            Self::SYS_STATUS(body) => body.ser(version, bytes),
38052            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
38053            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
38054            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
38055            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
38056            Self::TIMESYNC(body) => body.ser(version, bytes),
38057            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
38058            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
38059            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
38060            Self::TUNNEL(body) => body.ser(version, bytes),
38061            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
38062            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
38063            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
38064            Self::V2_EXTENSION(body) => body.ser(version, bytes),
38065            Self::VFR_HUD(body) => body.ser(version, bytes),
38066            Self::VIBRATION(body) => body.ser(version, bytes),
38067            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38068            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
38069            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
38070            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38071            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
38072            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
38073            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
38074            Self::WINCH_STATUS(body) => body.ser(version, bytes),
38075            Self::WIND_COV(body) => body.ser(version, bytes),
38076        }
38077    }
38078    fn extra_crc(id: u32) -> u8 {
38079        match id {
38080            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
38081            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
38082            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
38083            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
38084            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
38085            ASLCTRL_DATA_DATA::ID => ASLCTRL_DATA_DATA::EXTRA_CRC,
38086            ASLCTRL_DEBUG_DATA::ID => ASLCTRL_DEBUG_DATA::EXTRA_CRC,
38087            ASLUAV_STATUS_DATA::ID => ASLUAV_STATUS_DATA::EXTRA_CRC,
38088            ASL_OBCTRL_DATA::ID => ASL_OBCTRL_DATA::EXTRA_CRC,
38089            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
38090            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
38091            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
38092            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
38093            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
38094            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
38095            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
38096                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
38097            }
38098            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
38099            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
38100            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
38101            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
38102            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
38103            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
38104            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
38105            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
38106            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
38107            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
38108            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
38109            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
38110            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
38111            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
38112            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
38113            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
38114            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
38115            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
38116            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
38117            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
38118            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
38119            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
38120            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
38121            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
38122            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
38123            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
38124            COMMAND_INT_STAMPED_DATA::ID => COMMAND_INT_STAMPED_DATA::EXTRA_CRC,
38125            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
38126            COMMAND_LONG_STAMPED_DATA::ID => COMMAND_LONG_STAMPED_DATA::EXTRA_CRC,
38127            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
38128            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
38129            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
38130            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
38131            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
38132            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
38133            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
38134            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
38135            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
38136            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
38137            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
38138            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
38139            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
38140            EKF_EXT_DATA::ID => EKF_EXT_DATA::EXTRA_CRC,
38141            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
38142            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
38143            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
38144            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
38145            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
38146            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
38147            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
38148            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
38149            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
38150            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
38151            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
38152            FW_SOARING_DATA_DATA::ID => FW_SOARING_DATA_DATA::EXTRA_CRC,
38153            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
38154            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
38155            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
38156            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
38157            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
38158            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
38159            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
38160                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
38161            }
38162            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
38163            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
38164            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
38165            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
38166            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
38167                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
38168            }
38169            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
38170            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
38171            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
38172            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
38173            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
38174            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
38175            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
38176            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
38177            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
38178            GSM_LINK_STATUS_DATA::ID => GSM_LINK_STATUS_DATA::EXTRA_CRC,
38179            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
38180            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
38181            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
38182            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
38183            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
38184            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
38185            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
38186            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
38187            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
38188            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
38189            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
38190            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
38191            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
38192            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
38193            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
38194            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
38195            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
38196            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
38197            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
38198            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
38199            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
38200                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
38201            }
38202            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
38203            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
38204            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
38205            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
38206            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
38207            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
38208            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
38209            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
38210            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
38211            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
38212            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
38213            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
38214            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
38215            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
38216            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
38217            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
38218            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
38219            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
38220            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
38221            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
38222            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
38223            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
38224            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
38225            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
38226            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
38227            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
38228            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
38229            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
38230            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
38231            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
38232            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
38233            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
38234            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
38235            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
38236            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
38237            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
38238            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
38239            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
38240            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
38241            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
38242            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
38243            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
38244            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
38245            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
38246            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
38247            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
38248            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
38249            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
38250            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
38251            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
38252            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
38253            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
38254            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
38255            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
38256            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
38257            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
38258            PING_DATA::ID => PING_DATA::EXTRA_CRC,
38259            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
38260            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
38261            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
38262            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
38263            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
38264            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
38265            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
38266            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
38267            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
38268            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
38269            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
38270            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
38271            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
38272            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
38273            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
38274            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
38275            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
38276            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
38277            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
38278            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
38279            SATCOM_LINK_STATUS_DATA::ID => SATCOM_LINK_STATUS_DATA::EXTRA_CRC,
38280            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
38281            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
38282            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
38283            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
38284            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
38285            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
38286            SENSORPOD_STATUS_DATA::ID => SENSORPOD_STATUS_DATA::EXTRA_CRC,
38287            SENSOR_AIRFLOW_ANGLES_DATA::ID => SENSOR_AIRFLOW_ANGLES_DATA::EXTRA_CRC,
38288            SENS_ATMOS_DATA::ID => SENS_ATMOS_DATA::EXTRA_CRC,
38289            SENS_BATMON_DATA::ID => SENS_BATMON_DATA::EXTRA_CRC,
38290            SENS_MPPT_DATA::ID => SENS_MPPT_DATA::EXTRA_CRC,
38291            SENS_POWER_DATA::ID => SENS_POWER_DATA::EXTRA_CRC,
38292            SENS_POWER_BOARD_DATA::ID => SENS_POWER_BOARD_DATA::EXTRA_CRC,
38293            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
38294            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
38295            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
38296            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
38297            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
38298            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
38299            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
38300            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
38301            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
38302                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
38303            }
38304            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
38305            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
38306            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
38307            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
38308            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
38309            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
38310            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
38311            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
38312            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
38313            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
38314            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
38315            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
38316            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
38317            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
38318            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
38319                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
38320            }
38321            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
38322                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
38323            }
38324            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
38325            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
38326            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
38327            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
38328            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
38329            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
38330            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
38331            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
38332            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
38333            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
38334            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
38335            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
38336            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
38337            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
38338            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
38339            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
38340            _ => 0,
38341        }
38342    }
38343    fn target_system_id(&self) -> Option<u8> {
38344        match self {
38345            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
38346            Self::CANFD_FRAME(inner) => Some(inner.target_system),
38347            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
38348            Self::CAN_FRAME(inner) => Some(inner.target_system),
38349            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
38350            Self::COMMAND_ACK(inner) => Some(inner.target_system),
38351            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
38352            Self::COMMAND_INT(inner) => Some(inner.target_system),
38353            Self::COMMAND_INT_STAMPED(inner) => Some(inner.target_system),
38354            Self::COMMAND_LONG(inner) => Some(inner.target_system),
38355            Self::COMMAND_LONG_STAMPED(inner) => Some(inner.target_system),
38356            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
38357            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
38358            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
38359            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
38360            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
38361            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
38362            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
38363            Self::LOGGING_ACK(inner) => Some(inner.target_system),
38364            Self::LOGGING_DATA(inner) => Some(inner.target_system),
38365            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
38366            Self::LOG_ERASE(inner) => Some(inner.target_system),
38367            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
38368            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
38369            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
38370            Self::MISSION_ACK(inner) => Some(inner.target_system),
38371            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
38372            Self::MISSION_COUNT(inner) => Some(inner.target_system),
38373            Self::MISSION_ITEM(inner) => Some(inner.target_system),
38374            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
38375            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
38376            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
38377            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
38378            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
38379            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
38380            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
38381            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
38382            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
38383            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
38384            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
38385            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
38386            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
38387            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
38388            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
38389            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
38390            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
38391            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
38392            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
38393            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
38394            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
38395            Self::PARAM_SET(inner) => Some(inner.target_system),
38396            Self::PING(inner) => Some(inner.target_system),
38397            Self::PLAY_TUNE(inner) => Some(inner.target_system),
38398            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
38399            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
38400            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
38401            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
38402            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
38403            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
38404            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
38405            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
38406            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
38407            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
38408            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
38409            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
38410            Self::SET_MODE(inner) => Some(inner.target_system),
38411            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
38412            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
38413            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
38414            Self::TIMESYNC(inner) => Some(inner.target_system),
38415            Self::TUNNEL(inner) => Some(inner.target_system),
38416            Self::V2_EXTENSION(inner) => Some(inner.target_system),
38417            _ => None,
38418        }
38419    }
38420    fn target_component_id(&self) -> Option<u8> {
38421        match self {
38422            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
38423            Self::CANFD_FRAME(inner) => Some(inner.target_component),
38424            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
38425            Self::CAN_FRAME(inner) => Some(inner.target_component),
38426            Self::COMMAND_ACK(inner) => Some(inner.target_component),
38427            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
38428            Self::COMMAND_INT(inner) => Some(inner.target_component),
38429            Self::COMMAND_INT_STAMPED(inner) => Some(inner.target_component),
38430            Self::COMMAND_LONG(inner) => Some(inner.target_component),
38431            Self::COMMAND_LONG_STAMPED(inner) => Some(inner.target_component),
38432            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
38433            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
38434            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
38435            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
38436            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
38437            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
38438            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
38439            Self::LOGGING_ACK(inner) => Some(inner.target_component),
38440            Self::LOGGING_DATA(inner) => Some(inner.target_component),
38441            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
38442            Self::LOG_ERASE(inner) => Some(inner.target_component),
38443            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
38444            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
38445            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
38446            Self::MISSION_ACK(inner) => Some(inner.target_component),
38447            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
38448            Self::MISSION_COUNT(inner) => Some(inner.target_component),
38449            Self::MISSION_ITEM(inner) => Some(inner.target_component),
38450            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
38451            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
38452            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
38453            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
38454            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
38455            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
38456            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
38457            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
38458            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
38459            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
38460            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
38461            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
38462            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
38463            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
38464            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
38465            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
38466            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
38467            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
38468            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
38469            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
38470            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
38471            Self::PARAM_SET(inner) => Some(inner.target_component),
38472            Self::PING(inner) => Some(inner.target_component),
38473            Self::PLAY_TUNE(inner) => Some(inner.target_component),
38474            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
38475            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
38476            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
38477            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
38478            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
38479            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
38480            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
38481            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
38482            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
38483            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
38484            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
38485            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
38486            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
38487            Self::TIMESYNC(inner) => Some(inner.target_component),
38488            Self::TUNNEL(inner) => Some(inner.target_component),
38489            Self::V2_EXTENSION(inner) => Some(inner.target_component),
38490            _ => None,
38491        }
38492    }
38493}